build: Relink if version script changes.

This commit is contained in:
Ryan Pavlik 2020-03-04 10:04:57 -06:00
parent 75d5e5b9f2
commit 95b5c03f10

View file

@ -51,6 +51,11 @@ if(NOT MSVC)
APPEND_STRING
PROPERTY LINK_FLAGS
"-u xrNegotiateLoaderRuntimeInterface -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libopenxr.version")
# Re-link if the version script changes.
set_property(TARGET ${RUNTIME_TARGET}
APPEND
PROPERTY LINK_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/libopenxr.version")
endif()