diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2020-10-26 18:41:05 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2020-10-26 18:44:08 +0100 |
commit | 9e09ef39b730a6b217d5f16e81df9a437a7e384d (patch) | |
tree | b9919e7cc1fa20ee5d7a4cbfe15fd09167ab9f2f | |
parent | 68dd99bc6343a4ba7bbfa0d3093170f798fc9a5c (diff) | |
download | desktop-tools-9e09ef39b730a6b217d5f16e81df9a437a7e384d.tar.gz desktop-tools-9e09ef39b730a6b217d5f16e81df9a437a7e384d.tar.xz desktop-tools-9e09ef39b730a6b217d5f16e81df9a437a7e384d.zip |
Bump minimum CMake version to 3.0
A nice, round number. This allows us to remove some boilerplate.
-rw-r--r-- | CMakeLists.txt | 22 | ||||
-rw-r--r-- | config.h.in | 2 |
2 files changed, 6 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ff4b9b..97aa3ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -project (desktop-tools C) -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.0) +project (desktop-tools VERSION 0.1.0 LANGUAGES C) # Moar warnings if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) @@ -8,15 +8,6 @@ if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra ${wdisabled}") endif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) -# Version -set (project_VERSION_MAJOR "0") -set (project_VERSION_MINOR "1") -set (project_VERSION_PATCH "0") - -set (project_VERSION "${project_VERSION_MAJOR}") -set (project_VERSION "${project_VERSION}.${project_VERSION_MINOR}") -set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}") - # Dependencies set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/liberty/cmake) include (AddThreads) @@ -86,16 +77,13 @@ set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Desktop tools") set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch") set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>") set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") -set (CPACK_PACKAGE_VERSION_MAJOR ${project_VERSION_MAJOR}) -set (CPACK_PACKAGE_VERSION_MINOR ${project_VERSION_MINOR}) -set (CPACK_PACKAGE_VERSION_PATCH ${project_VERSION_PATCH}) set (CPACK_GENERATOR "TGZ;ZIP") set (CPACK_PACKAGE_FILE_NAME - "${PROJECT_NAME}-${project_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") -set (CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${project_VERSION}") + "${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") +set (CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${PROJECT_VERSION}") set (CPACK_SOURCE_GENERATOR "TGZ;ZIP") set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user") -set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${project_VERSION}") +set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}") set (CPACK_SET_DESTDIR TRUE) include (CPack) diff --git a/config.h.in b/config.h.in index 89cd306..086c99d 100644 --- a/config.h.in +++ b/config.h.in @@ -2,7 +2,7 @@ #define CONFIG_H #define PROGRAM_NAME "${PROJECT_NAME}" -#define PROGRAM_VERSION "${project_VERSION}" +#define PROGRAM_VERSION "${PROJECT_VERSION}" #endif // ! CONFIG_H |