Fix: [CMake] cross-compiling requires native tools
This commit is contained in:
@@ -1,22 +1,26 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(strgen)
|
||||
if (NOT HOST_BINARY_DIR)
|
||||
project(strgen)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake")
|
||||
|
||||
set(sourcefiles
|
||||
strgen.cpp
|
||||
strgen_base.cpp
|
||||
../core/alloc_func.cpp
|
||||
../misc/getoptdata.cpp
|
||||
../string.cpp
|
||||
)
|
||||
add_definitions(-DSTRGEN)
|
||||
add_executable(strgen ${sourcefiles})
|
||||
set(sourcefiles
|
||||
strgen.cpp
|
||||
strgen_base.cpp
|
||||
../core/alloc_func.cpp
|
||||
../misc/getoptdata.cpp
|
||||
../string.cpp
|
||||
)
|
||||
add_definitions(-DSTRGEN)
|
||||
add_executable(strgen ${sourcefiles})
|
||||
|
||||
include(Endian)
|
||||
add_endian_definition()
|
||||
include(Endian)
|
||||
add_endian_definition()
|
||||
|
||||
export(TARGETS strgen FILE ${CMAKE_BINARY_DIR}/strgen.cmake)
|
||||
add_dependencies(tools strgen)
|
||||
endif()
|
||||
|
||||
# Source Files
|
||||
add_files(strgen_base.cpp)
|
||||
|
Reference in New Issue
Block a user