+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
+
include(_Configure)
configure_init(${CMAKE_BINARY_DIR}/mem_config.h)
CACHE STRING "set relative rpath")
endif()
+if(${CMAKE_VERSION} VERSION_LESS "3.12")
+ set(TARGET_NAMELINK_COMPONENT "")
+else()
+ set(TARGET_NAMELINK_COMPONENT NAMELINK_COMPONENT dev)
+endif()
+
option(BUILD_TESTING "whether to enable build of the test suite"
$ENV{BUILD_TESTING})
option(BUILD_DOCSONLY "build *only* documentation"
set(SPHINX_CONF_APPEND ""
CACHE STRING "append verbatim code to sphinx' conf.py")
endif()
-
-# modules
-
-include(GNUInstallDirs)
-
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
-
-if(NOT BUILD_DOCSONLY)
- include(CMake/_Include.cmake)
-endif()
project(libmemcached
VERSION "${LIBMEMCACHED_VERSION}"
- HOMEPAGE_URL "https://github.com/m6w6/libmemcached"
DESCRIPTION "libmemcached, a C/C++ memcached client library"
)
+set(CMAKE_PROJECT_HOMEPAGE_URL "https://github.com/m6w6/libmemcached")
set(PROJECT_CONTACT "Michael Wallner <mike@php.net>")
set(CXX_STANDARD 11)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include(CMakeConfig.txt)
+include(GNUInstallDirs)
if(BUILD_DOCS OR BUILD_DOCSONLY)
add_subdirectory(docs)
endif()
if(NOT BUILD_DOCSONLY)
+ include(CMake/_Include.cmake)
set(CLIENTS
memcapable
install(TARGETS libhashkit EXPORT libhashkit-targets
LIBRARY
COMPONENT lib
- NAMELINK_COMPONENT dev
+ ${TARGET_NAMELINK_COMPONENT}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(EXPORT libhashkit-targets NAMESPACE libmemcached::)
install(EXPORT libhashkit-targets NAMESPACE libmemcached::
install(TARGETS libmemcached EXPORT libmemcached-targets
LIBRARY
COMPONENT lib
- NAMELINK_COMPONENT dev
+ ${TARGET_NAMELINK_COMPONENT}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(EXPORT libmemcached-targets NAMESPACE libmemcached::)
install(EXPORT libmemcached-targets NAMESPACE libmemcached::
install(TARGETS libmemcachedprotocol EXPORT libmemcachedprotocol-targets
LIBRARY
COMPONENT lib
- NAMELINK_COMPONENT dev
+ ${TARGET_NAMELINK_COMPONENT}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(EXPORT libmemcachedprotocol-targets NAMESPACE libmemcached::)
install(EXPORT libmemcachedprotocol-targets NAMESPACE libmemcached::
install(TARGETS libmemcachedutil EXPORT libmemcachedutil-targets
LIBRARY
COMPONENT lib
- NAMELINK_COMPONENT dev
+ ${TARGET_NAMELINK_COMPONENT}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(EXPORT libmemcachedutil-targets NAMESPACE libmemcached::)
install(EXPORT libmemcachedutil-targets NAMESPACE libmemcached::