1 cmake_minimum_required(VERSION 3.9...3.18)
3 if(${CMAKE_VERSION} VERSION_LESS 3.12)
4 cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
7 include(CMakeVersions.txt)
10 VERSION "${LIBMEMCACHED_VERSION}"
11 DESCRIPTION "libmemcached https://github.com/m6w6/libmemcached"
15 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
17 include(CMakeConfig.txt)
19 if(NOT BUILD_DOCSONLY)
21 set(AUTOHEADER_FILE mem_config.h)
40 add_subdirectory(include)
41 add_subdirectory(support)
42 add_subdirectory(test)
45 configure_file(src/mem_config.h.in ${AUTOHEADER_FILE} @ONLY)
48 if(BUILD_DOCS OR BUILD_DOCSONLY)
49 add_subdirectory(docs)
52 if(ENV{INVALID_CONFIGURATION})
53 message(FATAL_ERROR "invalid configuration -- giving up")