Use TDE cmake macro to set version

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit e9246d5e43)
r14.0.x
Michele Calgaro 2 years ago
parent f8ab981f0d
commit 66bfbbfb85
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -44,11 +44,11 @@ SET (VERSION_MINOR "7")
SET (VERSION_PATCH "0")
# comment out the next line for a public release
#SET (VERSION_SUFFIX "svn")
SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
SET (PACKAGE_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
IF(VERSION_SUFFIX)
SET (VERSION "${VERSION}-${VERSION_SUFFIX}")
SET (PACKAGE_VERSION "${PACKAGE_VERSION}-${VERSION_SUFFIX}")
ENDIF(VERSION_SUFFIX)
ADD_DEFINITIONS(-D'VERSION="${VERSION}"')
ADD_DEFINITIONS(-D'VERSION="${PACKAGE_VERSION}"')
##### include our cmake modules #################
@ -56,6 +56,11 @@ ADD_DEFINITIONS(-D'VERSION="${VERSION}"')
include( TDEMacros )
##### set version number ########################
tde_set_project_version( )
##### setup install paths #######################
include( TDESetupPaths )
@ -115,5 +120,5 @@ tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
configure_file( config.h.cmake config.h @ONLY )
# create and install the version file
FILE(WRITE "${CMAKE_BINARY_DIR}/version.txt" "${VERSION}\n")
FILE(WRITE "${CMAKE_BINARY_DIR}/version.txt" "${PACKAGE_VERSION}\n")
INSTALL( FILES "${CMAKE_BINARY_DIR}/version.txt" DESTINATION ${DATA_INSTALL_DIR}/rosegarden )

@ -215,7 +215,7 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -w -fexceptions -DNDEBUG -include tqt.h
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -Wall -fexceptions -DDEBUG -include tqt.h")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -Wall -fexceptions -DDEBUG -include tqt.h")
MESSAGE(STATUS "Rosegarden ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
MESSAGE(STATUS "Rosegarden ${PACKAGE_VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
IF(WANT_DEBUG)
IF(WANT_FULLDBG)

Loading…
Cancel
Save