Skip to content

Commit ce641b9

Browse files
committed
build: add workaround for CMake
It seems that `RPATH` is not properly handled by CMake on executables. Restore the old workaround for the time being.
1 parent c947023 commit ce641b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/Tools/XDGTestHelper/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ target_link_libraries(xdgTestHelper PRIVATE
55
FoundationNetworking
66
FoundationXML)
77
set_target_properties(xdgTestHelper PROPERTIES
8-
BUILD_RPATH "$<TARGET_FILE_DIR:swiftDispatch>;$<TARGET_FILE_DIR:Foundation>;$<TARGET_FILE_DIR:FoundationNetworking>;$<TARGET_FILE_DIR:FoundationXML>")
8+
BUILD_RPATH $<TARGET_FILE_DIR:swiftDispatch>;$<TARGET_FILE_DIR:Foundation>;$<TARGET_FILE_DIR:FoundationNetworking>;$<TARGET_FILE_DIR:FoundationXML>)
9+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
10+
target_link_options(xdgTestHelper PRIVATE
11+
"SHELL:-Xlinker -rpath -Xlinker $<TARGET_FILE_DIR:swiftDispatch>:$<TARGET_FILE_DIR:Foundation>:$<TARGET_FILE_DIR:FoundationNetworking>:$<TARGET_FILE_DIR:FoundationXML>")
12+
endif()

0 commit comments

Comments
 (0)