-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
42 lines (33 loc) · 1.05 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
41
42
cmake_minimum_required(VERSION 3.14)
project(PostBaby)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("Setting Debug profile")
add_compile_definitions(DEBUG_BUILD=1)
else()
message("Setting Release profile")
add_compile_definitions(RELEASE_BUILD=1)
endif()
set(PostBaby_VERSION_MAJOR
1
CACHE STRING "major version" FORCE)
set(PostBaby_VERSION_MINOR
0
CACHE STRING "minor version" FORCE)
set(PostBaby_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}
CACHE STRING "version" FORCE)
configure_file("${${PROJECT_NAME}_SOURCE_DIR}/include/config.hpp.in"
"${${PROJECT_NAME}_SOURCE_DIR}/include/config.hpp")
configure_file("${PROJECT_SOURCE_DIR}/include/config.hpp.in"
"${PROJECT_SOURCE_DIR}/include/config.hpp")
if(WIN32)
else()
set(COMPILE_FLAGS " -s ")
message("setting compiler flags")
add_definitions(${COMPILE_FLAGS})
endif()
# add subdiretories
add_subdirectory(extern EXCLUDE_FROM_ALL)
add_subdirectory(src)