-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
93 lines (77 loc) · 2.18 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
cmake_minimum_required(VERSION 3.9...3.18)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
include(CMakeVersions.txt)
project(libmemcached-awesome
VERSION "${LIBMEMCACHED_VERSION}"
DESCRIPTION "libmemcached-awesome, a C/C++ memcached client library"
)
set(PROJECT_HOMEPAGE_URL "https://github.com/awesomized/libmemcached")
set(PROJECT_CONTACT "Michael Wallner <[email protected]>")
set(CXX_STANDARD 11)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(GLOBAL_DEFINITIONS _GNU_SOURCE)
include(CMakeConfig.txt)
include(GNUInstallDirs)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
if(BUILD_DOCS OR BUILD_DOCSONLY)
add_subdirectory(docs)
endif()
if(NOT BUILD_DOCSONLY)
include(CMake/_Include.cmake)
set(CLIENTS
capable
cat
cp
dump
error
exist
flush
parse
ping
rm
slap
stat
touch
)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(contrib)
add_subdirectory(support)
# tests need c++17 support
add_subdirectory(test)
# keep last
configure_file(${CONFIGURE_FILE_IN} ${CONFIGURE_FILE_OUT} @ONLY)
endif()
list(APPEND PROJECT_CONFIG ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR})
list(APPEND PROJECT_CONFIG ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION})
list(APPEND PROJECT_CONFIG ${CMAKE_BUILD_TYPE})
include(CPack.txt)
install(FILES
AUTHORS
BUGS.md
ChangeLog-0.md
ChangeLog-1.0.md
ChangeLog-1.1.md
CONTRIBUTING.md
LICENSE
NEWS
README.md
TODO
COMPONENT doc
DESTINATION ${CMAKE_INSTALL_DOCDIR}/
)
if(NOT WIN32)
# skip links on windows (cmake bug?)
install(FILES
ChangeLog
ChangeLog.md
COPYING
COMPONENT doc
DESTINATION ${CMAKE_INSTALL_DOCDIR}/
)
endif()
if(ENV{INVALID_CONFIGURATION})
message(FATAL_ERROR "invalid configuration -- giving up")
endif()