[QGIS Commit] r8195 - trunk/qgis/cmake
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Mar 7 22:23:05 EST 2008
Author: timlinux
Date: 2008-03-07 22:23:05 -0500 (Fri, 07 Mar 2008)
New Revision: 8195
Modified:
trunk/qgis/cmake/FindExpat.cmake
Log:
Added some logic to allow libs and headers in non default locations to be used with priority over those in default locations (/usr and /usr/local)
Modified: trunk/qgis/cmake/FindExpat.cmake
===================================================================
--- trunk/qgis/cmake/FindExpat.cmake 2008-03-07 17:03:41 UTC (rev 8194)
+++ trunk/qgis/cmake/FindExpat.cmake 2008-03-08 03:23:05 UTC (rev 8195)
@@ -7,19 +7,28 @@
# 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
+ "$ENV{LIB_DIR}/include/"
+ "$ENV{LIB_DIR}/include/expat"
+ /Users/tim/dev/universal_libs/include
/usr/local/include
/usr/include
- "$ENV{LIB_DIR}/include/expat"
c:/msys/local/include
+ NO_DEFAULT_PATH
)
#libexpat needed for msvc version
FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat PATHS
+ "$ENV{LIB_DIR}/lib"
/usr/local/lib
/usr/lib
- "$ENV{LIB_DIR}/lib"
c:/msys/local/lib
+ NO_DEFAULT_PATH
)
IF (EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
More information about the QGIS-commit
mailing list