diff --git a/CMakeLists.txt b/CMakeLists.txt index 38249316..a83b3ff3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) # 'core' CMake stuff include(Conky) +# Set project version, languages +project(conky VERSION ${RELEASE_VERSION} LANGUAGES C CXX) + # Handle build options include(ConkyBuildOptions) @@ -76,7 +79,7 @@ if(BUILD_TESTS) endif() if(NOT DEFINED DOC_PATH) - set(DOC_PATH "share/doc/${CPACK_PACKAGE_NAME}-${VERSION}") + set(DOC_PATH "share/doc/${CPACK_PACKAGE_NAME}-${RELEASE_VERSION}") endif(NOT DEFINED DOC_PATH) set(DOC_FILES extras/convert.lua data/conky_no_x11.conf data/conky.conf) diff --git a/cmake/Conky.cmake b/cmake/Conky.cmake index 18ee3646..f6e80e08 100644 --- a/cmake/Conky.cmake +++ b/cmake/Conky.cmake @@ -176,11 +176,13 @@ execute_process(COMMAND ${APP_GIT} rev-parse --short HEAD OUTPUT_VARIABLE GIT_SHORT_SHA OUTPUT_STRIP_TRAILING_WHITESPACE) +set(RELEASE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") + if(RELEASE) - set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") + set(VERSION ${RELEASE_VERSION}) else(RELEASE) set(VERSION - "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-pre-${GIT_SHORT_SHA}") + "${RELEASE_VERSION}-pre-${GIT_SHORT_SHA}") endif(RELEASE) set(COPYRIGHT "Copyright Brenden Matthews, et al, 2005-2024")