cmake: Update defaults for cmake
[resolv_wrapper.git] / CMakeLists.txt
index 3e7ae6aad7c735c2623ed2dccbcada58fbd17793..911b9164c8f14276fad1be62395315c91a6bf0a1 100644 (file)
@@ -1,17 +1,12 @@
-project(resolv_wrapper C)
-
 # Required cmake version
-cmake_minimum_required(VERSION 2.8.0)
+cmake_minimum_required(VERSION 3.5.0)
+cmake_policy(SET CMP0048 NEW)
+
+project(resolv_wrapper VERSION 1.1.5 LANGUAGES C)
 
 # global needed variables
 set(APPLICATION_NAME ${PROJECT_NAME})
 
-set(APPLICATION_VERSION_MAJOR "1")
-set(APPLICATION_VERSION_MINOR "1")
-set(APPLICATION_VERSION_PATCH "1")
-
-set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
-
 # SOVERSION scheme: CURRENT.AGE.REVISION
 #   If there was an incompatible interface change:
 #     Increment CURRENT. Set AGE and REVISION to 0
@@ -19,7 +14,7 @@ set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINO
 #     Increment AGE. Set REVISION to 0
 #   If the source code was changed, but there were no interface changes:
 #     Increment REVISION.
-set(LIBRARY_VERSION "0.0.2")
+set(LIBRARY_VERSION "0.0.5")
 set(LIBRARY_SOVERSION "0")
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
@@ -30,7 +25,6 @@ set(CMAKE_MODULE_PATH
 # add definitions
 include(DefineCMakeDefaults)
 include(DefinePlatformDefaults)
-include(DefineCompilerFlags)
 include(DefineInstallationPaths)
 include(DefineOptions.cmake)
 include(CPackConfig.cmake)
@@ -47,6 +41,9 @@ find_package(Threads)
 include(ConfigureChecks.cmake)
 configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
+# Add compiler flags for the project now.
+include(DefineCompilerFlags)
+
 # check subdirectories
 add_subdirectory(src)