From 90d243e0bacb7410ce6f2112c47f5234c2a99237 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 3 Aug 2022 16:36:21 +0200 Subject: [PATCH] build: Fixed setting variable in plugin and added version define check --- cmake/build_helpers.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index da569e54e..8df34e3a7 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -8,6 +8,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release") endif() macro(addVersionDefines) + if (NOT IMHEX_VERSION) + message(FATAL_ERROR "IMHEX_VERSION is not defined") + endif () + if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git") # Get the current working branch execute_process( @@ -325,7 +329,7 @@ macro(setVariableInParent variable value) get_directory_property(hasParent PARENT_DIRECTORY) if (hasParent) - set(${variable} "${${value}}" PARENT_SCOPE) + set(${variable} "${value}" PARENT_SCOPE) else () set(${variable} "${value}") endif ()