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.
This commit is contained in:
Adriaan de Groot 2019-04-04 15:40:05 +02:00
parent b18e0a0bd8
commit 01f5ac22a0
3 changed files with 9 additions and 13 deletions

View File

@ -35,10 +35,10 @@
# One special target is "show-version", which can be built # One special target is "show-version", which can be built
# to obtain the version number from here. # to obtain the version number from here.
project( calamares C CXX ) cmake_minimum_required( VERSION 3.2 FATAL_ERROR )
project( calamares
cmake_minimum_required( VERSION 3.2 ) VERSION 3.2.5
LANGUAGES C CXX )
### OPTIONS ### OPTIONS
# #
@ -77,11 +77,11 @@ set( CALAMARES_APPLICATION_NAME "Calamares" )
set( CALAMARES_DESCRIPTION_SUMMARY set( CALAMARES_DESCRIPTION_SUMMARY
"The distribution-independent installer framework" ) "The distribution-independent installer framework" )
set( CALAMARES_VERSION_MAJOR 3 ) # Take settings from the project() command
set( CALAMARES_VERSION_MINOR 2 ) set( CALAMARES_VERSION_MAJOR ${calamares_VERSION_MAJOR} )
set( CALAMARES_VERSION_PATCH 5 ) set( CALAMARES_VERSION_MINOR ${calamares_VERSION_MINOR} )
set( CALAMARES_VERSION_RC 1 ) set( CALAMARES_VERSION_PATCH ${calamares_VERSION_PATCH} )
set( CALAMARES_VERSION_RC 0 )
### Transifex (languages) info ### Transifex (languages) info
# #

View File

@ -1,5 +1,3 @@
project( libcalamares CXX )
add_definitions( add_definitions(
${QT_DEFINITIONS} ${QT_DEFINITIONS}
-DQT_SHARED -DQT_SHARED

View File

@ -1,5 +1,3 @@
project( libcalamaresui CXX )
set( calamaresui_SOURCES set( calamaresui_SOURCES
modulesystem/CppJobModule.cpp modulesystem/CppJobModule.cpp
modulesystem/Module.cpp modulesystem/Module.cpp