-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
100 lines (74 loc) · 1.99 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#
# CMakeLists.txt for LillyDAP
#
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project ("LillyDAP" C)
set (CMAKE_MACOSX_RPATH 0)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
include (MacroEnsureOutOfSourceBuild)
include (MacroAddUninstallTarget)
include (MacroGitVersionInfo)
include (MacroCreateConfigFiles)
find_package(Gperf REQUIRED)
option (DEBUG
"Produce verbose output"
OFF)
option (BUILD_SINGLE_THREADED
"Build without atomic operations because LillyDAP runs in one thread"
OFF)
#
# Dependencies
#
if (NOT ${BUILD_SINGLE_THREADED})
find_package (Threads REQUIRED)
endif()
find_package (Quick-DER 1.2 REQUIRED)
#
# Version Information
#
get_version_from_git (LillyDAP 0.4.0)
#
# Building
#
include_directories (include)
include_directories (${Quick-DER_INCLUDE_DIRS})
include_directories (import/openpa-1.0.4/src)
if (${BUILD_SINGLE_THREADED})
add_definitions (-DCONFIG_SINGLE_THREADED)
else ()
add_subdirectory (import)
get_directory_property (OPENPA_INCLUDE_DIRS DIRECTORY import DEFINITION OPENPA_INCLUDE_DIRS)
include_directories (${OPENPA_INCLUDE_DIRS})
endif ()
add_subdirectory (lib)
#
# TESTS
#
enable_testing ()
add_subdirectory (test)
#
# INSTALLING
#
install (
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/lillydap
DESTINATION include
FILES_MATCHING PATTERN "*.h"
)
#
# PACKAGING
#
set (CPACK_PACKAGE_VERSION_MAJOR ${LillyDAP_VERSION_MAJOR})
set (CPACK_PACKAGE_VERSION_MINOR ${LillyDAP_VERSION_MINOR})
set (CPACK_PACKAGE_VERSION_PATCH ${LillyDAP_VERSION_PATCHLEVEL})
set (CPACK_BUNDLE_NAME "LillyDAP")
set (CPACK_PACKAGE_CONTACT "Rick van Rein <rick@openfortress.nl>")
set (CPACK_PACKAGE_VENDOR "ARPA2.net")
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "LDAP devkit, turns LDAP operations into functions/callbacks")
set (CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README.MD)
set (CPACK_GENERATOR DEB RPM)
set (CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
include (CPack)
create_config_files (LillyDAP)
#
# END OF CMakeLists.txt
#