Skip to content

Commit

Permalink
Added some logic to allow libs and headers in non default locations t…
Browse files Browse the repository at this point in the history
…o be used with priority over those in default locations (/usr and /usr/local)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8195 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Mar 8, 2008
1 parent 36cfbef commit 193448a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cmake/FindExpat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 193448a

Please sign in to comment.