From c2d759f11eed4aa96d7ad48114eed431dec4c3a1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 26 Mar 2021 14:33:44 +0100 Subject: [PATCH] CMake: make show-version available in all builds --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c0a800750..a95768f2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -522,13 +522,18 @@ 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. +# Special target for displaying the version. In RC (might-be-release) +# builds, use the short version (3.x.y), otherwise show the long version. if ( CALAMARES_VERSION_RC EQUAL 0 ) add_custom_target(show-version ${CMAKE_COMMAND} -E echo CALAMARES_VERSION=${CALAMARES_VERSION_SHORT} USES_TERMINAL ) +else() + add_custom_target(show-version + ${CMAKE_COMMAND} -E echo CALAMARES_VERSION=${CALAMARES_VERSION} + USES_TERMINAL + ) endif() # enforce using constBegin, constEnd for const-iterators