-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (33 loc) · 1.03 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.16.0)
# Project version
set(MAJOR_VERSION 1)
set(MINOR_VERSION 0)
set(PATCH_VERSION 0)
project(ProcessMonitor VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
# Include GNUInstallDirs module to access CMAKE_INSTALL_* directory variables
include(GNUInstallDirs)
# Add our local cmake directory to search for components
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake")
# Enable C++17 support.
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Enable warnings
add_compile_options(-Wall)
# Disables an annoying warning "<blah> will change in GCC X.XX"
add_compile_options(-Wno-psabi)
find_package(Threads)
add_executable(${PROJECT_NAME}
main.cpp
ProcessMonitor.cpp
)
target_include_directories(${PROJECT_NAME}
PRIVATE
./third_party
)
target_link_libraries(${PROJECT_NAME}
Threads::Threads
)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
)