Skip to content
Permalink
Browse files

cmake: Use ${CMAKE_DL_LIBS} instead of hardcoding "dl"

Some systems ship the dlopen() family of functions in a separate "libdl"
library, some others include them in the system libc, and others may use
a different name altogether.

Instead of hardcoding "dl" as the library name, pick the needed library
from the ${CMAKE_DL_LIBS}, which has been available since CMake 3.0 at
least:

  https://cmake.org/cmake/help/v3.0/variable/CMAKE_DL_LIBS.html
  • Loading branch information...
aperezdc committed Sep 19, 2019
1 parent 08db7c2 commit 4d79a5020370fee0eca1990e69a3c7dab42b6545
Showing with 2 additions and 2 deletions.
  1. +2 −2 CMakeLists.txt
@@ -58,7 +58,7 @@ set(WPE_INCLUDE_DIRECTORIES
)

set(WPE_LIBRARIES
dl
${CMAKE_DL_LIBS}
XkbCommon::libxkbcommon
)

@@ -163,4 +163,4 @@ IF(BUILD_DOCS)
ELSE()
MESSAGE(FATAL_ERROR "Hotdoc C extension not found... can't build the documentation.")
ENDIF()
ENDIF()
ENDIF()

0 comments on commit 4d79a50

Please sign in to comment.
You can’t perform that action at this time.