doc: Update documentation for glibc 2.34 changes
[resolv_wrapper.git] / CMakeLists.txt
index 18abd22293ba58cb4ffca2e88701a3d720cbb4d2..9399bf9f334d9c29839c90b513377b80899239d5 100644 (file)
@@ -11,20 +11,23 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
 include(DefineCMakeDefaults)
 include(DefineCompilerFlags)
 
-project(resolv_wrapper VERSION 1.1.5 LANGUAGES C)
+project(resolv_wrapper VERSION 1.1.7 LANGUAGES C)
 
 # global needed variables
 set(APPLICATION_NAME ${PROJECT_NAME})
 
-# SOVERSION scheme: CURRENT.AGE.REVISION
+# SOVERSION scheme: MAJOR.MINOR.PATCH
 #   If there was an incompatible interface change:
-#     Increment CURRENT. Set AGE and REVISION to 0
+#     Increment MAJOR. Set MINOR and PATCH to 0
 #   If there was a compatible interface change:
-#     Increment AGE. Set REVISION to 0
+#     Increment MINOR. Set PATCH to 0
 #   If the source code was changed, but there were no interface changes:
-#     Increment REVISION.
-set(LIBRARY_VERSION "0.0.5")
-set(LIBRARY_SOVERSION "0")
+#     Increment PATCH.
+set(LIBRARY_VERSION_MAJOR 0)
+set(LIBRARY_VERSION_MINOR 0)
+set(LIBRARY_VERSION_PATCH 7)
+set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}")
+set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR})
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
 set(CMAKE_MODULE_PATH
@@ -33,15 +36,11 @@ set(CMAKE_MODULE_PATH
 
 # add definitions
 include(DefinePlatformDefaults)
-include(DefineInstallationPaths)
+include(GNUInstallDirs)
 include(DefineOptions.cmake)
 include(CPackConfig.cmake)
 include(CompilerChecks.cmake)
 
-# disallow in-source build
-include(MacroEnsureOutOfSourceBuild)
-macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")
-
 # Find out if we have threading available
 set(CMAKE_THREAD_PREFER_PTHREADS ON)
 find_package(Threads)
@@ -61,7 +60,7 @@ install(
   FILES
     ${CMAKE_CURRENT_BINARY_DIR}/resolv_wrapper.pc
   DESTINATION
-    ${LIB_INSTALL_DIR}/pkgconfig
+     ${CMAKE_INSTALL_LIBDIR}/pkgconfig
   COMPONENT
     pkgconfig
 )
@@ -74,14 +73,14 @@ install(
         ${CMAKE_CURRENT_BINARY_DIR}/resolv_wrapper-config-version.cmake
         ${CMAKE_CURRENT_BINARY_DIR}/resolv_wrapper-config.cmake
     DESTINATION
-        ${CMAKE_INSTALL_DIR}/resolv_wrapper
+        ${CMAKE_INSTALL_LIBDIR}/cmake/resolv_wrapper
     COMPONENT
         devel
 )
 
 add_subdirectory(doc)
 if (UNIT_TESTING)
-    find_package(cmocka REQUIRED)
+    find_package(cmocka 1.1.0 REQUIRED)
     include(AddCMockaTest)
     add_subdirectory(tests)
 endif (UNIT_TESTING)