mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Better version identification.
An ambiguity existed between release candidates and development versions as there was no definitive identification for development versions. Added a new version number suffix of '-devel' which appears if the release candidate number is missing or zero in Versions.cmake and the revision is not marked as a release version, also in Versions.cmake. Also re-factored setting of version number suffiexes to a single place in in CMake/VersionCompute.cmake. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4422 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
272aa2caae
commit
ffa6305b98
@ -1,8 +1,11 @@
|
|||||||
# Load version number components.
|
# Load version number components.
|
||||||
include (${wsjtx_SOURCE_DIR}/Versions.cmake)
|
include (${CMAKE_SOURCE_DIR}/Versions.cmake)
|
||||||
|
|
||||||
# Compute the full version string.
|
# Compute the full version string.
|
||||||
|
if (WSJTX_RC AND NOT WSJTX_VERSION_IS_RELEASE)
|
||||||
|
set (WSJTX_VERSION_PATCH ${WSJTX_VERSION_PATCH}-rc${WSJTX_RC})
|
||||||
|
elseif (NOT WSJTX_VERSION_IS_RELEASE)
|
||||||
|
set (WSJTX_VERSION_PATCH ${WSJTX_VERSION_PATCH}-devel)
|
||||||
|
endif (WSJTX_RC AND NOT WSJTX_VERSION_IS_RELEASE)
|
||||||
|
|
||||||
set (wsjtx_VERSION ${WSJTX_VERSION_MAJOR}.${WSJTX_VERSION_MINOR}.${WSJTX_VERSION_PATCH})
|
set (wsjtx_VERSION ${WSJTX_VERSION_MAJOR}.${WSJTX_VERSION_MINOR}.${WSJTX_VERSION_PATCH})
|
||||||
if (WSJTX_RC)
|
|
||||||
set (wsjtx_VERSION ${wsjtx_VERSION}-rc${WSJTX_RC})
|
|
||||||
endif ()
|
|
||||||
|
@ -39,7 +39,7 @@ set (PROJECT_DESCRIPTION "${PROJECT_SUMMARY_DESCRIPTION}
|
|||||||
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMake/Modules)
|
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMake/Modules)
|
||||||
|
|
||||||
include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake)
|
include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake)
|
||||||
|
message (STATUS "Building ${CMAKE_PROJECT_NAME}-${wsjtx_VERSION}")
|
||||||
|
|
||||||
# make sure that the default configuration is a RELEASE
|
# make sure that the default configuration is a RELEASE
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
@ -952,9 +952,6 @@ set (CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
|
|||||||
set (CPACK_PACKAGE_VERSION_MAJOR ${WSJTX_VERSION_MAJOR})
|
set (CPACK_PACKAGE_VERSION_MAJOR ${WSJTX_VERSION_MAJOR})
|
||||||
set (CPACK_PACKAGE_VERSION_MINOR ${WSJTX_VERSION_MINOR})
|
set (CPACK_PACKAGE_VERSION_MINOR ${WSJTX_VERSION_MINOR})
|
||||||
set (CPACK_PACKAGE_VERSION_PATCH ${WSJTX_VERSION_PATCH})
|
set (CPACK_PACKAGE_VERSION_PATCH ${WSJTX_VERSION_PATCH})
|
||||||
if (WSJTX_RC)
|
|
||||||
set (CPACK_PACKAGE_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH}-rc${WSJTX_RC})
|
|
||||||
endif (WSJTX_RC)
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set (CPACK_GENERATOR "NSIS")
|
set (CPACK_GENERATOR "NSIS")
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
set (WSJTX_VERSION_MAJOR 1)
|
set (WSJTX_VERSION_MAJOR 1)
|
||||||
set (WSJTX_VERSION_MINOR 5)
|
set (WSJTX_VERSION_MINOR 5)
|
||||||
set (WSJTX_VERSION_PATCH 0)
|
set (WSJTX_VERSION_PATCH 0)
|
||||||
set (WSJTX_RC 1)
|
set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions
|
||||||
set (WSJTX_VERSION_IS_RELEASE 0)
|
set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build
|
||||||
|
|
||||||
set (CONFIG_TEST_VERSION_MAJOR 0)
|
set (CONFIG_TEST_VERSION_MAJOR 0)
|
||||||
set (CONFIG_TEST_VERSION_MINOR 2)
|
set (CONFIG_TEST_VERSION_MINOR 2)
|
||||||
|
@ -76,11 +76,6 @@ QString program_title (QString const& revision)
|
|||||||
{
|
{
|
||||||
#if defined (CMAKE_BUILD)
|
#if defined (CMAKE_BUILD)
|
||||||
QString id {QCoreApplication::applicationName () + " v" WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH)};
|
QString id {QCoreApplication::applicationName () + " v" WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH)};
|
||||||
|
|
||||||
# if defined (WSJTX_RC)
|
|
||||||
id += "-rc" WSJTX_STRINGIZE (WSJTX_RC);
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
QString id {"WSJT-X Not for Release"};
|
QString id {"WSJT-X Not for Release"};
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
#define WSJTX_VERSION_MAJOR @WSJTX_VERSION_MAJOR@
|
#define WSJTX_VERSION_MAJOR @WSJTX_VERSION_MAJOR@
|
||||||
#define WSJTX_VERSION_MINOR @WSJTX_VERSION_MINOR@
|
#define WSJTX_VERSION_MINOR @WSJTX_VERSION_MINOR@
|
||||||
#define WSJTX_VERSION_PATCH @WSJTX_VERSION_PATCH@
|
#define WSJTX_VERSION_PATCH @WSJTX_VERSION_PATCH@
|
||||||
#cmakedefine WSJTX_RC @WSJTX_RC@
|
|
||||||
#cmakedefine01 WSJTX_VERSION_IS_RELEASE
|
|
||||||
|
|
||||||
#define CONFIG_TEST_VERSION_MAJOR @CONFIG_TEST_VERSION_MAJOR@
|
#define CONFIG_TEST_VERSION_MAJOR @CONFIG_TEST_VERSION_MAJOR@
|
||||||
#define CONFIG_TEST_VERSION_MINOR @CONFIG_TEST_VERSION_MINOR@
|
#define CONFIG_TEST_VERSION_MINOR @CONFIG_TEST_VERSION_MINOR@
|
||||||
|
Loading…
Reference in New Issue
Block a user