mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-23 18:35:44 -05:00
CMake: add target show-version to get version information
This commit is contained in:
parent
2f6e80dc42
commit
dfb42f2b49
1 changed files with 12 additions and 1 deletions
|
@ -28,6 +28,9 @@
|
|||
# Example usage:
|
||||
#
|
||||
# cmake . -DSKIP_MODULES="partition luksbootkeycfg"
|
||||
#
|
||||
# One special target is "show-version", which can be built
|
||||
# to obtain the version number from here.
|
||||
|
||||
project( calamares C CXX )
|
||||
|
||||
|
@ -74,7 +77,6 @@ set( CALAMARES_VERSION_MINOR 2 )
|
|||
set( CALAMARES_VERSION_PATCH 1 )
|
||||
set( CALAMARES_VERSION_RC 0 )
|
||||
|
||||
|
||||
### Transifex (languages) info
|
||||
#
|
||||
# complete = 100% translated,
|
||||
|
@ -394,6 +396,15 @@ if( NOT BUILD_RELEASE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/" )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Special target for not-RC (e.g. might-be-release) builds.
|
||||
# This is used by the release script to get the version.
|
||||
if ( CALAMARES_VERSION_RC EQUAL 0 )
|
||||
add_custom_target(show-version
|
||||
${CMAKE_COMMAND} -E echo CALAMARES_VERSION=${CALAMARES_VERSION_SHORT}
|
||||
USES_TERMINAL
|
||||
)
|
||||
endif()
|
||||
|
||||
# enforce using constBegin, constEnd for const-iterators
|
||||
add_definitions( "-DQT_STRICT_ITERATORS" )
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue