-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (37 loc) · 935 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Setup project
cmake_minimum_required(VERSION 3.12.0)
project(passcoder)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
find_package(PkgConfig REQUIRED)
find_package(OpenSSL 1.1.0 REQUIRED)
find_package(Boost 1.70 REQUIRED COMPONENTS json)
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0)
file(GLOB PROJECT_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.*pp"
)
# Defines
add_compile_definitions(DEBUG)
# Setup compiler
if(MSVC)
add_compile_options(/w4)
else()
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
target_include_directories(
${PROJECT_NAME}
PRIVATE ${GTKMM_INCLUDE_DIRS}
PRIVATE ${Boost_INCLUDE_DIRS}
PUBLIC include
)
target_link_libraries(
${PROJECT_NAME}
PRIVATE ${GTKMM_LIBRARIES}
PRIVATE OpenSSL::Crypto
PRIVATE Boost::json
)
target_compile_features(
${PROJECT_NAME}
PRIVATE cxx_std_14
PRIVATE cxx_lambda_init_captures
)