-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (35 loc) · 1.3 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
43
44
45
cmake_minimum_required(VERSION 3.20.0)
set(APP_VERSION "0.0.0" CACHE STRING "Application version")
project(kdeck VERSION ${APP_VERSION} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(OSBitness 32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OSBitness 64)
endif()
set(FullOutputDir "${CMAKE_BINARY_DIR}/bin/${CMAKE_SYSTEM_NAME}${OSBitness}/${CMAKE_BUILD_TYPE}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${FullOutputDir}/static_libs")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${FullOutputDir}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${FullOutputDir}")
configure_file(
"${CMAKE_SOURCE_DIR}/include/app_config.hpp.in"
"${CMAKE_BINARY_DIR}/include/app_config.hpp"
)
find_package(OpenGL REQUIRED)
find_package(wxWidgets CONFIG REQUIRED COMPONENTS core base gl)
find_package(OpenSSL REQUIRED)
find_package(oatpp CONFIG REQUIRED)
find_package(oatpp-openssl CONFIG REQUIRED)
# Check if the build type is Debug
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# do nothing
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_definitions(OATPP_DISABLE_LOGV)
add_compile_definitions(OATPP_DISABLE_LOGD)
#add_compile_definitions(OATPP_DISABLE_LOGI)
#add_compile_definitions(OATPP_DISABLE_LOGW)
#add_compile_definitions(OATPP_DISABLE_LOGE)
else()
# do nothing
endif()
add_subdirectory(src)