Browse Source

CMake: use CMAKE_DL_LIBS on Linux for linking with GNU gold

Gold only link what explicitly specified and we use dlopen.
Arseniy Shestakov 7 years ago
parent
commit
734441eb3b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      CMakeLists.txt

+ 1 - 0
CMakeLists.txt

@@ -176,6 +176,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR NOT WIN32) #so far all *nix compilers support suc
 
 
 	if(UNIX)
 	if(UNIX)
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+		set(SYSTEM_LIBS ${SYSTEM_LIBS} ${CMAKE_DL_LIBS})
 	endif()
 	endif()
 endif()
 endif()