mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 16:07:52 -05:00
2c3520f454
this removes submodules and external libraries in the code in favor of importing them as CPM packages. CPM_SOURCE_CACHE is recommended as codegen has to readd two of the same dependencies
29 lines
No EOL
709 B
CMake
29 lines
No EOL
709 B
CMake
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
|
|
project(Codegen LANGUAGES C CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
include(../cmake/CPM.cmake)
|
|
|
|
CPMAddPackage("gh:fmtlib/fmt#9.1.0")
|
|
CPMAddPackage("gh:gulrak/filesystem#3e5b930")
|
|
CPMAddPackage("gh:matcool/PEGTL#8faeb5d")
|
|
|
|
add_subdirectory(Broma)
|
|
|
|
file(GLOB SOURCES
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
|
|
)
|
|
|
|
add_executable(${PROJECT_NAME} ${SOURCES})
|
|
|
|
target_link_libraries(Codegen PRIVATE fmt::fmt Broma ghc_filesystem)
|
|
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}) |