-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
30 lines (22 loc) · 932 Bytes
/
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.12)
set(CMAKE_CXX_STANDARD 20)
include(FetchContent)
project(gametablesdkdemo)
find_package(spdlog REQUIRED)
add_subdirectory(${gametablesdkdemo_SOURCE_DIR}/lib)
add_executable(${PROJECT_NAME})
ProcessorCount(N)
if(NOT N EQUAL 0)
set(CTEST_BUILD_FLAGS -j${N})
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(libmahjong PRIVATE -pedantic -Wall -Wmost -Wextra)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(libmahjong PRIVATE -pedantic -Wall -Wextra)
endif()
add_subdirectory(${gametablesdkdemo_SOURCE_DIR}/src)
get_target_property(gametablesdkdemo_sources gametablesdkdemo SOURCES)
target_include_directories(${PROJECT_NAME} PUBLIC "${gametablesdkdemo_SOURCE_DIR}/include")
target_link_libraries(${PROJECT_NAME} libmahjong)
target_link_libraries(${PROJECT_NAME} gametablesdk)