[QGIS-trac] [Quantum GIS] #1939: Use ${CMAKE_DL_LIBS} instead of dl
for library dependencies
Quantum GIS
qgis at qgis.org
Sun Sep 20 17:18:04 EDT 2009
#1939: Use ${CMAKE_DL_LIBS} instead of dl for library dependencies
---------------------------------------------------------+------------------
Reporter: brook | Owner: nobody
Type: patch | Status: new
Priority: critical: causes crash or data corruption | Milestone: Version 1.4.0
Component: Build/Install | Version: HEAD
Keywords: | Platform_version:
Platform: Unix | Must_fix: Yes
Status_info: 0 |
---------------------------------------------------------+------------------
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})
}}}
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1939>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list