From 519a9edb60da6d5629cf74cc4382c8f8cf82af48 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 7 Aug 2022 23:50:49 +0200 Subject: [PATCH] build: Make sure version string is always being set --- cmake/build_helpers.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index c545408c3..923aabc2d 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -36,15 +36,16 @@ macro(addVersionDefines) set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -DPROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} -DPROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR} -DPROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH} ") + set(IMHEX_VERSION_STRING ${IMHEX_VERSION}) if (CMAKE_BUILD_TYPE STREQUAL "Release") - set(IMHEX_VERSION_STRING ${IMHEX_VERSION}) + set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}) elseif (CMAKE_BUILD_TYPE STREQUAL "Debug") - set(IMHEX_VERSION_STRING ${IMHEX_VERSION}-Debug) + set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-Debug) add_compile_definitions(DEBUG) elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") - set(IMHEX_VERSION_STRING ${IMHEX_VERSION}-RelWithDebInfo) + set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-RelWithDebInfo) elseif (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") - set(IMHEX_VERSION_STRING ${IMHEX_VERSION}-MinSizeRel) + set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-MinSizeRel) endif () add_compile_definitions(IMHEX_VERSION="${IMHEX_VERSION_STRING}")