Skip to content

Commit

Permalink
Fixed --enable-new-dtags check with cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 8, 2016
1 parent dc5f05b commit 757e994
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Expand Up @@ -957,12 +957,13 @@ elseif(UNIX AND NOT APPLE)
if(RPATH)
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")
set(SDL_RLD_FLAGS "-Wl,-rpath,\${libdir} -Wl,--enable-new-dtags")
else()
set(SDL_RLD_FLAGS "-Wl,-rpath,\${libdir}")
endif()
elseif(SOLARIS)
set(SDL_RLD_FLAGS "-R\${libdir}")
Expand Down

0 comments on commit 757e994

Please sign in to comment.