build: Don't add defines to libimhex after precompiling headers
This commit is contained in:
parent
c412ba66d8
commit
7bdde15796
@ -65,6 +65,16 @@ if (APPLE)
|
||||
set(LIBIMHEX_SOURCES ${LIBIMHEX_SOURCES} source/helpers/utils_macos.m)
|
||||
endif ()
|
||||
|
||||
if (GIT_COMMIT_HASH_LONG STREQUAL "" OR GIT_BRANCH STREQUAL "")
|
||||
message(WARNING "Failed to to determine commit hash/branch")
|
||||
else()
|
||||
addDefineToSource(source/api/imhex_api.cpp "GIT_COMMIT_HASH_LONG=\"${GIT_COMMIT_HASH_LONG}\"")
|
||||
addDefineToSource(source/api/imhex_api.cpp "GIT_BRANCH=\"${GIT_BRANCH}\"")
|
||||
endif ()
|
||||
|
||||
addDefineToSource(source/api/imhex_api.cpp "IMHEX_VERSION=\"${IMHEX_VERSION_STRING}\"")
|
||||
|
||||
|
||||
if (IMHEX_EXTERNAL_PLUGIN_BUILD)
|
||||
add_library(libimhex IMPORTED SHARED GLOBAL)
|
||||
set(LIBIMHEX_LIBRARY_TYPE INTERFACE)
|
||||
@ -137,13 +147,4 @@ else()
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (GIT_COMMIT_HASH_LONG STREQUAL "" OR GIT_BRANCH STREQUAL "")
|
||||
message(WARNING "Failed to to determine commit hash/branch")
|
||||
else()
|
||||
addDefineToSource(source/api/imhex_api.cpp "GIT_COMMIT_HASH_LONG=\"${GIT_COMMIT_HASH_LONG}\"")
|
||||
addDefineToSource(source/api/imhex_api.cpp "GIT_BRANCH=\"${GIT_BRANCH}\"")
|
||||
endif ()
|
||||
|
||||
addDefineToSource(source/api/imhex_api.cpp "IMHEX_VERSION=\"${IMHEX_VERSION_STRING}\"")
|
||||
|
||||
add_dependencies(imhex_all libimhex)
|
Loading…
Reference in New Issue
Block a user