build: temporarily add -ldl unconditionally

This commit is contained in:
Danny Robson 2018-01-23 18:52:42 +11:00
parent dda3a4a8e7
commit b5d8b6bca3

View File

@ -404,20 +404,22 @@ DEPENDS
###############################################################################
add_library(cruft-util ${UTIL_FILES})
target_link_libraries (cruft-util PUBLIC ${LIBS})
target_include_directories(cruft-util PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
###############################################################################
# platform libraries
search_libs (SHM_LIBS shm_open rt)
search_libs (DL_LIBS dlopen dl)
search_libs (CLOCK_LIBS clock_gettime rt c)
search_libs (MATH_LIBS cos m)
target_link_libraries(cruft-util PUBLIC ${SHM_LIBS})
target_link_libraries(cruft-util PUBLIC ${DL_LIBS})
target_link_libraries(cruft-util PUBLIC ${CLOCK_LIBS})
target_link_libraries(cruft-util PUBLIC ${MATH_LIBS})
target_link_libraries(cruft-util ${SHM_LIBS})
target_link_libraries(cruft-util ${DL_LIBS})
target_link_libraries(cruft-util ${CLOCK_LIBS})
target_link_libraries(cruft-util ${MATH_LIBS})
# HACK: -ldl isn't getting discovered correctly so we add it unconditionally
# for the time being.
target_link_libraries(cruft-util dl)
###############################################################################