mirror of https://github.com/libsdl-org/SDL
Fixed --enable-new-dtags check with cmake
This commit is contained in:
parent
dc5f05bb99
commit
757e994eaa
|
@ -957,12 +957,13 @@ elseif(UNIX AND NOT APPLE)
|
||||||
if(RPATH)
|
if(RPATH)
|
||||||
set(SDL_RLD_FLAGS "")
|
set(SDL_RLD_FLAGS "")
|
||||||
if(BSDI OR FREEBSD OR LINUX OR NETBSD)
|
if(BSDI OR FREEBSD OR LINUX OR NETBSD)
|
||||||
set(SDL_RLD_FLAGS "-Wl,-rpath,\${libdir}")
|
|
||||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--enable-new-dtags")
|
set(CMAKE_REQUIRED_FLAGS "-Wl,--enable-new-dtags")
|
||||||
check_c_compiler_flag("" HAVE_ENABLE_NEW_DTAGS)
|
check_c_compiler_flag("" HAVE_ENABLE_NEW_DTAGS)
|
||||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||||
if(HAVE_ENABLE_NEW_DTAGS)
|
if(HAVE_ENABLE_NEW_DTAGS)
|
||||||
list(APPEND SDL_RLD_FLAGS "-Wl,--enable-new-dtags")
|
set(SDL_RLD_FLAGS "-Wl,-rpath,\${libdir} -Wl,--enable-new-dtags")
|
||||||
|
else()
|
||||||
|
set(SDL_RLD_FLAGS "-Wl,-rpath,\${libdir}")
|
||||||
endif()
|
endif()
|
||||||
elseif(SOLARIS)
|
elseif(SOLARIS)
|
||||||
set(SDL_RLD_FLAGS "-R\${libdir}")
|
set(SDL_RLD_FLAGS "-R\${libdir}")
|
||||||
|
|
Loading…
Reference in New Issue