This repository has been archived by the owner on May 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
53 lines (40 loc) · 1.64 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
cmake_minimum_required(VERSION 2.8)
project(biometryd)
set(BIOMETRYD_VERSION_MAJOR 1)
set(BIOMETRYD_VERSION_MINOR 0)
set(BIOMETRYD_VERSION_PATCH 1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -pedantic -Wextra -fPIC -fvisibility=hidden -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Werror -Wall -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pedantic -Wextra -fPIC -pthread")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
include(GNUInstallDirs)
set(
BIOMETRYD_DEFAULT_PLUGIN_DIRECTORY "${CMAKE_INSTALL_FULL_LIBDIR}/biometryd/plugins"
CACHE STRING "Default plugin installation directory")
set(
BIOMETRYD_CUSTOM_PLUGIN_DIRECTORY "/custom/vendor/biometryd/plugins"
CACHE STRING "Custom plugin installation directory")
enable_testing()
find_package(PkgConfig)
find_package(Boost COMPONENTS filesystem program_options system REQUIRED)
pkg_check_modules(DBUS_CPP dbus-cpp REQUIRED)
pkg_check_modules(DBUS dbus-1 REQUIRED)
pkg_check_modules(LIBAPPARMOR libapparmor REQUIRED)
pkg_check_modules(PROCESS_CPP process-cpp REQUIRED)
pkg_check_modules(SQLITE3 sqlite3 REQUIRED)
include_directories(
include
src
# Make sure that files generated during build are available for compilation.
# Most notably, this refers to include/biometry/version.h
${CMAKE_BINARY_DIR}/include
${Boost_INCLUDE_DIRS}
${DBUS_CPP_INCLUDE_DIRS}
${DBUS_INCLUDE_DIRS}
${LIBAPPARMOR_INCLUDE_DIRS}
${PROCESS_CPP_INCLUDE_DIRS}
${SQLITE3_INCLUDE_DIRS})
add_subdirectory(data)
add_subdirectory(doc)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(tests)