[QGIS Commit] r8203 - trunk/qgis/cmake

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Mar 10 12:08:43 EDT 2008


Author: timlinux
Date: 2008-03-10 12:08:43 -0400 (Mon, 10 Mar 2008)
New Revision: 8203

Modified:
   trunk/qgis/cmake/FindGEOS.cmake
   trunk/qgis/cmake/FindProj.cmake
Log:
Added the possibility to use these libs from non default locations by specifying them in LIB_DIR. Before this change, the presence of the lib in /usr or /usr/local would override command line specified paths


Modified: trunk/qgis/cmake/FindGEOS.cmake
===================================================================
--- trunk/qgis/cmake/FindGEOS.cmake	2008-03-10 16:05:55 UTC (rev 8202)
+++ trunk/qgis/cmake/FindGEOS.cmake	2008-03-10 16:08:43 UTC (rev 8203)
@@ -7,22 +7,28 @@
 #    GEOS_LIBRARY
 
 
+# Normally there is no need to specify /usr/... paths because 
+# cmake will look there automatically. However the NO_DEFAULT_PATH
+# prevents this behaviour allowing you to use no standard file
+# locations in preference over standard ones. Note in this case
+# you then need to explicitly add /usr and /usr/local prefixes
+# to the search list. This applies both to FIND_PATH and FIND_LIBRARY
 FIND_PATH(GEOS_INCLUDE_DIR geos.h 
+  "$ENV{LIB_DIR}/include"
   /usr/local/include 
   /usr/include 
-  #MSVC
-  "$ENV{LIB_DIR}/include"
   #mingw
   c:/msys/local/include
+  NO_DEFAULT_PATH
   )
 
 FIND_LIBRARY(GEOS_LIBRARY NAMES geos PATHS 
+  "$ENV{LIB_DIR}/lib"
   /usr/local/lib 
   /usr/lib 
-  #MSVC
-  "$ENV{LIB_DIR}/lib"
   #mingw
   c:/msys/local/lib
+  NO_DEFAULT_PATH
   )
 
 IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)

Modified: trunk/qgis/cmake/FindProj.cmake
===================================================================
--- trunk/qgis/cmake/FindProj.cmake	2008-03-10 16:05:55 UTC (rev 8202)
+++ trunk/qgis/cmake/FindProj.cmake	2008-03-10 16:08:43 UTC (rev 8203)
@@ -7,20 +7,28 @@
 #    PROJ_LIBRARY
 
 
+# Normally there is no need to specify /usr/... paths because 
+# cmake will look there automatically. However the NO_DEFAULT_PATH
+# prevents this behaviour allowing you to use no standard file
+# locations in preference over standard ones. Note in this case
+# you then need to explicitly add /usr and /usr/local prefixes
+# to the search list. This applies both to FIND_PATH and FIND_LIBRARY
 FIND_PATH(PROJ_INCLUDE_DIR proj_api.h 
+  "$ENV{LIB_DIR}/include/proj"
+  "$ENV{LIB_DIR}/include"
   /usr/local/include 
   /usr/include 
-  #msvc
-  "$ENV{LIB_DIR}/include/proj"
   #mingw
   c:/msys/local/include
+  NO_DEFAULT_PATH
   )
 
 FIND_LIBRARY(PROJ_LIBRARY NAMES proj PATHS 
+  "$ENV{LIB_DIR}/lib"
   /usr/local/lib 
   /usr/lib 
-  "$ENV{LIB_DIR}/lib"
   c:/msys/local/lib
+  NO_DEFAULT_PATH
   )
 
 IF (PROJ_INCLUDE_DIR AND PROJ_LIBRARY)



More information about the QGIS-commit mailing list