use CMAKE_DL_LIBS rather then linking libdl directly.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 30 Aug 2013 20:26:57 +0000 (20:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 30 Aug 2013 20:26:57 +0000 (20:26 +0000)
added to cycles standalone too.

CMakeLists.txt
build_files/cmake/macros.cmake
intern/cycles/app/CMakeLists.txt

index c956fb2ca8c6626fae2acbe75d8bc687188e02f4..040e393867b56e6c3d22fe0851adce63b9725f5d 100644 (file)
@@ -882,8 +882,6 @@ if(UNIX AND NOT APPLE)
 
        if(CMAKE_SYSTEM_NAME MATCHES "Linux")
                if(NOT WITH_PYTHON_MODULE)
-                       # BSD's dont use libdl.so
-               set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -ldl")
                        # binreloc is linux only
                        set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
                        set(WITH_BINRELOC ON)
index ace1ed912be77eae76dc54f6bba35b53111e0f07..e392666ea96a6dea0972b2c67f1b47b64cf55a5b 100644 (file)
@@ -387,7 +387,7 @@ macro(setup_liblinks
                target_link_libraries(${target} ${PTHREADS_LIBRARIES})
        endif()
 
-       target_link_libraries(${target} ${PLATFORM_LINKLIBS})
+       target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
 endmacro()
 
 macro(TEST_SSE_SUPPORT
index ded00f61b36be366d7731a85f29937eec943a598..d5446ed1d4813eb53b4d8fc1ac0845027da8ff02 100644 (file)
@@ -45,7 +45,7 @@ if(WITH_CYCLES_STANDALONE)
                cycles_xml.h
        )
        add_executable(cycles ${SRC})
-       target_link_libraries(cycles ${LIBRARIES})
+       target_link_libraries(cycles ${LIBRARIES} ${CMAKE_DL_LIBS})
 
        if(UNIX AND NOT APPLE)
                set_target_properties(cycles PROPERTIES INSTALL_RPATH $ORIGIN/lib)