Skip to content

Commit df15b8f

Browse files
committed
fix RPATH for OSX
1 parent 3374066 commit df15b8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ add_library(${LIBRARY_NAME}
173173
${${LIBRARY_NAME}_SOURCES}
174174
)
175175

176-
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "\$ORIGIN")
176+
if(UNIX)
177+
get_relative_rpath(${CMAKE_INSTALL_FULL_LIBDIR} ${PROJECT_NAME}_INSTALL_RPATH)
178+
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${${PROJECT_NAME}_INSTALL_RPATH}")
179+
endif()
177180

178181
# IDE sources and headers sorting
179182
ADD_SOURCE_GROUP(${LIBRARY_NAME}_SOURCES)

0 commit comments

Comments
 (0)