-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
48 lines (39 loc) · 1.54 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
46
47
48
cmake_minimum_required(VERSION 3.8)
# Project
project(dbus-glue)
# Add Executable
add_library(
dbus-glue STATIC
"source/dbus-glue/bindings/message.cpp"
"source/dbus-glue/bindings/types.cpp"
"source/dbus-glue/bindings/bus.cpp"
"source/dbus-glue/bindings/object_path.cpp"
"source/dbus-glue/bindings/signature.cpp"
"source/dbus-glue/generator/generator.cpp"
"source/dbus-glue/generator/introspect.cpp"
"source/dbus-glue/bindings/slot.cpp"
"source/dbus-glue/bindings/event_loop.cpp"
"source/dbus-glue/bindings/busy_loop.cpp"
"source/dbus-glue/bindings/detail/slot_holder.cpp"
"source/dbus-glue/bindings/detail/bus_error.c"
"source/dbus-glue/bindings/exposables/exposable_method.cpp"
"source/dbus-glue/bindings/exposables/exposable_property.cpp")
include(FindPkgConfig)
pkg_check_modules(SYSTEMD REQUIRED IMPORTED_TARGET libsystemd)
message(STATUS "${SYSTEMD}")
find_package(Boost 1.80.0 REQUIRED)
target_link_libraries(dbus-glue PUBLIC PkgConfig::SYSTEMD -lpthread Boost::boost)
target_include_directories(dbus-glue
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
# Compiler Options
target_compile_options(dbus-glue PRIVATE "$<$<CONFIG:DEBUG>:-fexceptions;-g;-Wall;-pedantic-errors;-pedantic>")
target_compile_options(dbus-glue
PRIVATE "$<$<CONFIG:RELEASE>:-fexceptions;-O3>")
set_target_properties(dbus-glue PROPERTIES CXX_STANDARD 20)
# Install
install(TARGETS dbus-glue DESTINATION lib)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING
PATTERN "*.h*")