Skip to content

Commit bf9d4f4

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 004f0b8 commit bf9d4f4

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)