build: Fixed setting variable in plugin and added version define check
This commit is contained in:
parent
c34df428dc
commit
90d243e0ba
@ -8,6 +8,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
macro(addVersionDefines)
|
macro(addVersionDefines)
|
||||||
|
if (NOT IMHEX_VERSION)
|
||||||
|
message(FATAL_ERROR "IMHEX_VERSION is not defined")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git")
|
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git")
|
||||||
# Get the current working branch
|
# Get the current working branch
|
||||||
execute_process(
|
execute_process(
|
||||||
@ -325,7 +329,7 @@ macro(setVariableInParent variable value)
|
|||||||
get_directory_property(hasParent PARENT_DIRECTORY)
|
get_directory_property(hasParent PARENT_DIRECTORY)
|
||||||
|
|
||||||
if (hasParent)
|
if (hasParent)
|
||||||
set(${variable} "${${value}}" PARENT_SCOPE)
|
set(${variable} "${value}" PARENT_SCOPE)
|
||||||
else ()
|
else ()
|
||||||
set(${variable} "${value}")
|
set(${variable} "${value}")
|
||||||
endif ()
|
endif ()
|
||||||
|
Loading…
Reference in New Issue
Block a user