Feature request #1939
Use ${CMAKE_DL_LIBS} instead of dl for library dependencies
| Status: | Closed | ||
|---|---|---|---|
| Priority: | Low | ||
| Assignee: | |||
| Category: | Build/Install | ||
| Pull Request or Patch supplied: | Resolution: | fixed | |
| Easy fix?: | No | Copied to github as #: | 11999 |
Description
All platforms do not require linking against libdl; NetBSD is one example. Therefore, it is incorrect to hardcode a requirement on this library. Cmake provides the variable CMAKE_DL_LIBS that is intended to contain the platform-appropriate libraries. The following patch replaces the use of 'dl' with the variable.
--- qgis/src/core/CMakeLists.txt.orig
+++ qgis/src/core/CMakeLists.txt
@@ -280,7 +280,7 @@
TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY})
ENDIF (WIN32 OR APPLE)
IF (UNIX)
- TARGET_LINK_LIBRARIES(qgis_core pthread dl)
+ TARGET_LINK_LIBRARIES(qgis_core pthread ${CMAKE_DL_LIBS})
ENDIF (UNIX)
ELSE (WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY})
History
#1
Updated by Jürgen Fischer about 16 years ago
- Resolution set to fixed
- Status changed from Open to Closed
applied in 0e4c5229 (SVN r11693). Thanks.