cmake: IMPORT, EXPORT and RPATH improvements
[awesomized/libmemcached] / CMakeConfig.txt
1 set(CMAKE_BUILD_TYPE Release
2 CACHE STRING "build type (Release, Debug, ...)")
3 set(CMAKE_INSTALL_PREFIX /usr/local
4 CACHE PATH "install prefix")
5
6 if(APPLE)
7 set(CMAKE_INSTALL_RPATH @loader_path
8 CACHE STRING "set relative rpath")
9 elseif(UNIX)
10 # FIXME
11 set(CMAKE_INSTALL_RPATH $ORIGIN
12 CACHE STRING "set relative rpath")
13 endif()
14
15 option(BUILD_TESTING "whether to enable build of the test suite"
16 OFF)
17 option(BUILD_DOCSONLY "build *only* documentation"
18 OFF)
19 option(BUILD_DOCS "build documentation"
20 ${BUILD_DOCSONLY})
21 option(BUILD_DOCS_HTML "build HTML docs"
22 ${BUILD_DOCS})
23 option(BUILD_DOCS_MAN "build manpages"
24 ${BUILD_DOCS})
25 option(BUILD_DOCS_MANGZ "gzip manpages"
26 ${BUILD_DOCS_MAN})
27
28 option(ENABLE_DTRACE "enable dtrace support"
29 OFF)
30 option(ENABLE_HASH_FNV64 "enable fnv64 hash support"
31 ON)
32 option(ENABLE_HASH_MURMUR "enable murmur hash support"
33 ON)
34 option(ENABLE_HASH_HSIEH "enable hsieh hash support"
35 OFF)
36 option(ENABLE_MEMASLAP "enable memaslap client"
37 ON)
38 option(ENABLE_SASL "enable SASL support"
39 OFF)
40
41 set(ENABLE_SANITIZERS ""
42 CACHE STRING "sanitizers to enable (e.g. address undefined ...)")
43
44 if(BUILD_TESTING)
45 set(MEMCACHED_BINARY "/usr/bin/memcached"
46 CACHE FILEPATH "memcached binary")
47 endif()
48
49 if(BUILD_DOCS)
50 set(SPHINX_OPTIONS ""
51 CACHE STRING "additional sphinx-build command line options")
52 set(SPHINX_THEME "sphinx_rtd_theme"
53 CACHE STRING "sphinx HTML theme")
54 set(SPHINX_THEME_OPTIONS ""
55 CACHE STRING "sphinx HTML theme options")
56 set(SPHINX_EXTENSIONS ""
57 CACHE STRING "comma separated list of quoted sphinx extensions")
58 set(SPHINX_CONF_APPEND ""
59 CACHE STRING "append verbatim code to sphinx' conf.py")
60 endif()
61
62 # legacy
63
64 set(HAVE_VISIBILITY 1)
65 set(HAVE_SHARED_ENABLED 1)
66 set(HAVE_GCC_BUILTIN_ATOMIC 1)
67
68 # modules
69
70 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
71
72 if(NOT BUILD_DOCSONLY)
73 include(CMake/_Include.cmake)
74 endif()