Skip to content

Commit c4d49d2

Browse files
committed
Try using the library path to define the rpath
This seems to be working, although it's not great that the library is in a weird SDK path...
1 parent 3788670 commit c4d49d2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tools/api-query/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ add_offloadtest_tool(api-query
44
target_link_libraries(api-query PRIVATE LLVMSupport OffloadTestAPI)
55

66
if (APPLE AND OFFLOADTEST_ENABLE_VULKAN)
7+
get_filename_component(_Vulkan_LIB_DIR ${Vulkan_LIBRARY} DIRECTORY)
78
set_property(TARGET api-query APPEND_STRING PROPERTY
8-
LINK_FLAGS " -Wl,-rpath,/usr/local/lib ")
9+
LINK_FLAGS " -Wl,-rpath,${_Vulkan_LIB_DIR} ")
910
endif()

tools/offloader/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ target_link_libraries(offloader PRIVATE
88
OffloadTestSupport)
99

1010
if (APPLE AND OFFLOADTEST_ENABLE_VULKAN)
11+
get_filename_component(_Vulkan_LIB_DIR ${Vulkan_LIBRARY} DIRECTORY)
1112
set_property(TARGET offloader APPEND_STRING PROPERTY
12-
LINK_FLAGS " -Wl,-rpath,/usr/local/lib ")
13+
LINK_FLAGS " -Wl,-rpath,${_Vulkan_LIB_DIR} ")
1314
endif()

0 commit comments

Comments
 (0)