-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (44 loc) · 1.53 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
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(-Wall -Wextra -pedantic)
project(alterator_usbmount LANGUAGES CXX VERSION 0.1)
find_package(PkgConfig REQUIRED)
find_package(Boost REQUIRED)
include(GNUInstallDirs)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# dbus + systemd
find_package(sdbus-c++ REQUIRED)
pkg_check_modules(SYSTEMD REQUIRED IMPORTED_TARGET systemd)
# alterator lisp bingings
add_subdirectory(alterator_bindings)
# common
add_subdirectory(common)
# libudev
pkg_check_modules(UDEV REQUIRED IMPORTED_TARGET libudev)
message("Building daemon...")
add_subdirectory(daemon)
# alterator-usb-mount
add_subdirectory(alterator_usbmount)
# only for debug
if(DEFINED BUILD_EXPERIMENTAL)
add_subdirectory(experimental)
endif()
# docs
IF (DEFINED BUILD_DOCS)
find_package(Doxygen)
if (DOXYGEN_FOUND)
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")
add_custom_target( doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
else (DOXYGEN_FOUND)
message ("Doxygen is required to be installed to generate documentation.")
endif (DOXYGEN_FOUND)
ENDIF (DEFINED BUILD_DOCS)
#cmake -S . -B build -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -G Ninja