Use ${CMAKE_DL_LIBS} rather than listing OSes.

CMake makes our lives easier. Needed for NetBSD, which also
doesn't have libdl.so.
This commit is contained in:
coypu 2018-08-02 15:42:20 +03:00
parent 87820d9387
commit 443e656be2

View File

@ -41,7 +41,5 @@ add_library(arch STATIC ${sources})
if (UNIX)
target_link_libraries(arch ${libs})
if (NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(arch dl)
endif()
target_link_libraries(arch ${CMAKE_DL_LIBS})
endif()