mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-29 10:55:47 -05:00
3c5fbc2754
this is necessary in cross compilation enviroments, such as compiling for android or cross compiling to windows on linux, since we want the codegen executable to be of the current system, not the cross compilation target
24 lines
No EOL
658 B
CMake
24 lines
No EOL
658 B
CMake
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
|
|
project(Codegen LANGUAGES C CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
add_subdirectory(Broma)
|
|
add_subdirectory(../fmt ${CMAKE_CURRENT_BINARY_DIR}/fmt)
|
|
add_subdirectory(../filesystem ${CMAKE_CURRENT_BINARY_DIR}/fs)
|
|
|
|
file(GLOB SOURCES
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
|
|
)
|
|
|
|
add_executable(${PROJECT_NAME} ${SOURCES})
|
|
target_link_libraries(Codegen PRIVATE fmt::fmt Broma)
|
|
target_include_directories(Codegen PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
)
|
|
|
|
target_precompile_headers(Codegen PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/Shared.hpp
|
|
)
|
|
|
|
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) |