-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
40 lines (33 loc) · 1.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.16) # At least CMake-3.16 is required
# Install deps using Conan
find_program(CONAN_EXE conan REQUIRED)
execute_process(
# TODO conan args: make sure they're correct
COMMAND ${CONAN_EXE} install .
-b missing
# -vquiet
-of ${CMAKE_BINARY_DIR}
# -pr:b=default -pr=default
-s build_type=${CMAKE_BUILD_TYPE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_BINARY_DIR}/conan_toolchain.cmake)
project(rocket-ui CXX) # Create Project
find_package(samarium CONFIG REQUIRED)
find_package(RapidJSON REQUIRED)
add_executable(rocket-ui src/main.cpp)
target_compile_features(rocket-ui PUBLIC cxx_std_20) # set C++ standard
target_link_libraries(rocket-ui samarium::samarium)
target_link_libraries(rocket-ui rapidjson)
# TODO for now not using this, just running it thru python
# if(CURRENT_EXAMPLE)
# add_custom_target(
# run ALL
# COMMAND example
# DEPENDS example
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# USES_TERMINAL
# )
# endif()
# conan creates its own preset...but cmake gives error deuplicate preset: default
file(REMOVE CMakeUserPresets.json)