Browse Source

More portable libdl handling

Dmitry Marakasov 10 years ago
parent
commit
093ad29ae1
1 changed files with 2 additions and 5 deletions
  1. 2 5
      CMakeLists.txt

+ 2 - 5
CMakeLists.txt

@@ -105,13 +105,10 @@ if(NOT WIN32)
 	if(HAVE_RT_LIB)
 		set(SYSTEM_LIBS ${SYSTEM_LIBS} rt)
 	endif()
-
-	CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_DL_LIB)
-	if(HAVE_DL_LIB)
-		set(SYSTEM_LIBS ${SYSTEM_LIBS} dl)
-	endif()
 endif()
 
+set(SYSTEM_LIBS ${SYSTEM_LIBS} ${CMAKE_DL_LIBS})
+
 set(FFmpeg_FIND_COMPONENTS AVFORMAT SWSCALE)
 find_package(Boost 1.48.0 COMPONENTS filesystem locale program_options system thread REQUIRED)
 find_package(ZLIB REQUIRED)