[QGIS Commit] r8404 - trunk/qgis/cmake

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed May 7 00:57:13 EDT 2008


Author: telwertowski
Date: 2008-05-07 00:57:13 -0400 (Wed, 07 May 2008)
New Revision: 8404

Modified:
   trunk/qgis/cmake/FindExpat.cmake
   trunk/qgis/cmake/FindGEOS.cmake
   trunk/qgis/cmake/FindProj.cmake
   trunk/qgis/cmake/FindSqlite3.cmake
Log:
Search CMake default standard locations rather than explicitly encoding standard locations into files. On a Mac, the standard locations may also include framework paths and the frameworks need to be searched either first or last depending upon other CMake settings.


Modified: trunk/qgis/cmake/FindExpat.cmake
===================================================================
--- trunk/qgis/cmake/FindExpat.cmake	2008-05-07 04:13:38 UTC (rev 8403)
+++ trunk/qgis/cmake/FindExpat.cmake	2008-05-07 04:57:13 UTC (rev 8404)
@@ -7,29 +7,26 @@
 #    EXPAT_INCLUDE_DIR
 #    EXPAT_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(EXPAT_INCLUDE_DIR expat.h 
+# FIND_PATH and FIND_LIBRARY normally search standard locations
+# before the specified paths. To search non-standard paths first,
+# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
+# and then again with no specified paths to search the default
+# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
+# searching for the same item do nothing. 
+FIND_PATH(EXPAT_INCLUDE_DIR expat.h
   "$ENV{LIB_DIR}/include/"
   "$ENV{LIB_DIR}/include/expat"
-  /Users/tim/dev/universal_libs/include
-  /usr/local/include 
-  /usr/include 
   c:/msys/local/include
   NO_DEFAULT_PATH
   )
+FIND_PATH(EXPAT_INCLUDE_DIR expat.h)
 #libexpat needed for msvc version
 FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat PATHS 
   "$ENV{LIB_DIR}/lib"
-  /usr/local/lib 
-  /usr/lib 
   c:/msys/local/lib
   NO_DEFAULT_PATH
   )
+FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat)
 
 IF (EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
    SET(EXPAT_FOUND TRUE)

Modified: trunk/qgis/cmake/FindGEOS.cmake
===================================================================
--- trunk/qgis/cmake/FindGEOS.cmake	2008-05-07 04:13:38 UTC (rev 8403)
+++ trunk/qgis/cmake/FindGEOS.cmake	2008-05-07 04:57:13 UTC (rev 8404)
@@ -7,29 +7,27 @@
 #    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 
+# FIND_PATH and FIND_LIBRARY normally search standard locations
+# before the specified paths. To search non-standard paths first,
+# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
+# and then again with no specified paths to search the default
+# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
+# searching for the same item do nothing. 
+FIND_PATH(GEOS_INCLUDE_DIR geos.h
   "$ENV{LIB_DIR}/include"
-  /usr/local/include 
-  /usr/include 
   #mingw
   c:/msys/local/include
   NO_DEFAULT_PATH
   )
+FIND_PATH(GEOS_INCLUDE_DIR geos.h)
 
 FIND_LIBRARY(GEOS_LIBRARY NAMES geos PATHS 
   "$ENV{LIB_DIR}/lib"
-  /usr/local/lib 
-  /usr/lib 
   #mingw
   c:/msys/local/lib
   NO_DEFAULT_PATH
   )
+FIND_LIBRARY(GEOS_LIBRARY NAMES geos)
 
 IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
    SET(GEOS_FOUND TRUE)

Modified: trunk/qgis/cmake/FindProj.cmake
===================================================================
--- trunk/qgis/cmake/FindProj.cmake	2008-05-07 04:13:38 UTC (rev 8403)
+++ trunk/qgis/cmake/FindProj.cmake	2008-05-07 04:57:13 UTC (rev 8404)
@@ -7,29 +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 
+# FIND_PATH and FIND_LIBRARY normally search standard locations
+# before the specified paths. To search non-standard paths first,
+# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
+# and then again with no specified paths to search the default
+# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
+# searching for the same item do nothing. 
+FIND_PATH(PROJ_INCLUDE_DIR proj_api.h
   "$ENV{LIB_DIR}/include/proj"
   "$ENV{LIB_DIR}/include"
-  /usr/local/include 
-  /usr/include 
   #mingw
   c:/msys/local/include
   NO_DEFAULT_PATH
   )
+FIND_PATH(PROJ_INCLUDE_DIR proj_api.h)
 
-FIND_LIBRARY(PROJ_LIBRARY NAMES proj PATHS 
+FIND_LIBRARY(PROJ_LIBRARY NAMES proj PATHS
   "$ENV{LIB_DIR}/lib"
-  /usr/local/lib 
-  /usr/lib 
+  #mingw
   c:/msys/local/lib
   NO_DEFAULT_PATH
   )
+FIND_LIBRARY(PROJ_LIBRARY NAMES proj)
 
 IF (PROJ_INCLUDE_DIR AND PROJ_LIBRARY)
    SET(PROJ_FOUND TRUE)

Modified: trunk/qgis/cmake/FindSqlite3.cmake
===================================================================
--- trunk/qgis/cmake/FindSqlite3.cmake	2008-05-07 04:13:38 UTC (rev 8403)
+++ trunk/qgis/cmake/FindSqlite3.cmake	2008-05-07 04:57:13 UTC (rev 8404)
@@ -7,29 +7,28 @@
 #    SQLITE3_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(SQLITE3_INCLUDE_DIR sqlite3.h 
+# FIND_PATH and FIND_LIBRARY normally search standard locations
+# before the specified paths. To search non-standard paths first,
+# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
+# and then again with no specified paths to search the default
+# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
+# searching for the same item do nothing. 
+FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h
   "$ENV{LIB_DIR}/include"
   "$ENV{LIB_DIR}/include/sqlite"
-  /usr/local/include 
-  /usr/include 
   #mingw
   c:/msys/local/include
   NO_DEFAULT_PATH
   )
+FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h)
 
-FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 PATHS 
+FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 PATHS
   "$ENV{LIB_DIR}/lib"
-  /usr/local/lib 
-  /usr/lib 
+  #mingw
   c:/msys/local/lib
   NO_DEFAULT_PATH
   )
+FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3)
 
 IF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
    SET(SQLITE3_FOUND TRUE)



More information about the QGIS-commit mailing list