-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
30 lines (22 loc) · 1.01 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
cmake_minimum_required(VERSION 3.24)
cmake_policy(SET CMP0091 NEW)
project(StateMachine)
if (VCPKG_TARGET_TRIPLET MATCHES "-static$")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
add_library(StateMachine INTERFACE)
target_include_directories(StateMachine INTERFACE ${CMAKE_SOURCE_DIR}/include)
add_executable(Example1 examples/Example1.cpp)
target_link_libraries(Example1 PRIVATE StateMachine)
target_compile_features(Example1 PRIVATE cxx_std_11)
add_executable(Example2 examples/Example2.cpp)
target_link_libraries(Example2 PRIVATE StateMachine)
target_compile_features(Example2 PRIVATE cxx_std_11)
add_executable(Example3 examples/Example3.cpp)
target_link_libraries(Example3 PRIVATE StateMachine)
target_compile_features(Example3 PRIVATE cxx_std_11)
add_executable(Example4 examples/Example4.cpp)
target_link_libraries(Example4 PRIVATE StateMachine)
target_compile_features(Example4 PRIVATE cxx_std_17)