From 01f5ac22a0953002c6c091a7d301493fe320c8f7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 4 Apr 2019 15:40:05 +0200 Subject: [PATCH] CMake: use conventional method for setting version - Using project() to set up the version is idiomatic for CMake and more standardised than doing it by hand. Do retain the RC flag, because that's used in other parts of versioning. --- CMakeLists.txt | 18 +++++++++--------- src/libcalamares/CMakeLists.txt | 2 -- src/libcalamaresui/CMakeLists.txt | 2 -- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 226c97a31..8477e33f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,10 +35,10 @@ # One special target is "show-version", which can be built # to obtain the version number from here. -project( calamares C CXX ) - -cmake_minimum_required( VERSION 3.2 ) - +cmake_minimum_required( VERSION 3.2 FATAL_ERROR ) +project( calamares + VERSION 3.2.5 + LANGUAGES C CXX ) ### OPTIONS # @@ -77,11 +77,11 @@ set( CALAMARES_APPLICATION_NAME "Calamares" ) set( CALAMARES_DESCRIPTION_SUMMARY "The distribution-independent installer framework" ) -set( CALAMARES_VERSION_MAJOR 3 ) -set( CALAMARES_VERSION_MINOR 2 ) -set( CALAMARES_VERSION_PATCH 5 ) -set( CALAMARES_VERSION_RC 1 ) - +# Take settings from the project() command +set( CALAMARES_VERSION_MAJOR ${calamares_VERSION_MAJOR} ) +set( CALAMARES_VERSION_MINOR ${calamares_VERSION_MINOR} ) +set( CALAMARES_VERSION_PATCH ${calamares_VERSION_PATCH} ) +set( CALAMARES_VERSION_RC 0 ) ### Transifex (languages) info # diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index aeea34470..a7dd1c0fe 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -1,5 +1,3 @@ -project( libcalamares CXX ) - add_definitions( ${QT_DEFINITIONS} -DQT_SHARED diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt index 99531e5ff..498faba95 100644 --- a/src/libcalamaresui/CMakeLists.txt +++ b/src/libcalamaresui/CMakeLists.txt @@ -1,5 +1,3 @@ -project( libcalamaresui CXX ) - set( calamaresui_SOURCES modulesystem/CppJobModule.cpp modulesystem/Module.cpp