Use --enable-new-dtags to set RUNPATH rather than RPATH so that LD_LIBRARY_PATH is not overridden by the application.
This commit is contained in:
@@ -958,6 +958,12 @@ elseif(UNIX AND NOT APPLE)
|
||||
set(SDL_RLD_FLAGS "")
|
||||
if(BSDI OR FREEBSD OR LINUX OR NETBSD)
|
||||
set(SDL_RLD_FLAGS "-Wl,-rpath,\${libdir}")
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--enable-new-dtags")
|
||||
check_c_compiler_flag("" HAVE_ENABLE_NEW_DTAGS)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
if(HAVE_ENABLE_NEW_DTAGS)
|
||||
list(APPEND SDL_RLD_FLAGS "-Wl,--enable-new-dtags")
|
||||
endif()
|
||||
elseif(SOLARIS)
|
||||
set(SDL_RLD_FLAGS "-R\${libdir}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user