Hi Oliver,

I started working on the Debian packaging of GT -- the app looks great!

I'm really glad that you switched to CMake. Please consider the attached
patch, that adds FIND_LIBRARY commands for GDAL and PROJ. IMHO this
makes it a little easier to deal with the various library names and
locations across installations (especially for people compiling from
sources). Additionally, Cmake will now complains about missing libs (not
just headers) right at the start, instead of failing at the end.

The patch also adds gdal1.5.0 as a possible name for a GDAL library.
Apparently Debian folks do not trust GDAL upstream management of API/ABI
and decided to add some more characters to the SONAME. The situation is
the same for Ubuntu.

Finally, let me ask you which package name you'd prefer: 'qlandkartegt'
or 'qlandkarte-gt'. I tend to like the second better than the first,
especially concerning a future packaging of QLandkarteM:

  * qlandkartegt
  * qlandkartem

vs.

  * qlandkarte-gt
  * qlandkarte-m

The first set seems to me a little to cluttered. What do you think?


Thanks,

Michael


-- 
GPG key:  1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 506da5f..ce882cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,15 @@ IF(UNIX)
     ENDIF(NOT GDAL_INCLUDE )
     MESSAGE("Using " ${GDAL_INCLUDE} " for GDAL")
 
+    # find gdal lib
+    FIND_LIBRARY(GDAL_LIBRARY NAMES gdal gdal1.5.0
+                 PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
+                       /sw/lib /opt/local/lib
+                 DOC "The GDAL library")
+    IF(NOT GDAL_LIBRARY)
+        MESSAGE(FATAL_ERROR "\n\nCan't find GDAL library. Is GDAL installed correctly?\n")
+    ENDIF(NOT GDAL_LIBRARY)
+
     # find Proj4 headers
     FIND_PATH(PROJ_INCLUDE projects.h /usr/include /usr/include/proj4)
 
@@ -47,6 +56,16 @@ IF(UNIX)
     ENDIF(NOT PROJ_INCLUDE )
     MESSAGE("Using " ${PROJ_INCLUDE} " for Proj4")
 
+    # find proj lib
+    FIND_LIBRARY(PROJ_LIBRARY NAMES proj
+                 PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
+                       /sw/lib /opt/local/lib
+                 DOC "The PROJ library")
+    IF(NOT PROJ_LIBRARY)
+        MESSAGE(FATAL_ERROR "\n\nCan't find PROJ library. Is PROJ installed correctly?\n")
+    ENDIF(NOT PROJ_LIBRARY)
+
+
     SET(QL_LIBDIR "/usr/lib/qlandkarte")
     MESSAGE("Searching " ${QL_LIBDIR} " for Garmin plugins")
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 87c8b42..1fd95c4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -304,7 +304,7 @@ add_executable( qlandkartegt ${qlandkarte_SRCS} ${qlandkarte_HDRS} ${qlandkarte_
 
 IF(UNIX)
   add_definitions(-Wall -O2 -DQL_LIBDIR=${QL_LIBDIR} -DSOEXT=${SOEXT})
-  target_link_libraries(qlandkartegt gdal proj ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QL_OPENGL_LIBRARIES})
+  target_link_libraries(qlandkartegt ${GDAL_LIBRARY} ${PROJ_LIBRARY} ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QL_OPENGL_LIBRARIES})
 ENDIF(UNIX)
 
 IF(WIN32)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QLandkarte-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkarte-users

Reply via email to