Skip to content

Commit 74d769a

Browse files
committed
cmake : set RPATH to $ORIGIN on Linux (#13740)
1 parent b775345 commit 74d769a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ if (MSVC)
5656
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/bigobj>")
5757
endif()
5858

59+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
60+
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
61+
set(CMAKE_INSTALL_RPATH $ORIGIN)
62+
endif()
63+
5964
#
6065
# option list
6166
#

0 commit comments

Comments
 (0)