Skip to content
Permalink
Browse files

Added some logic to allow libs and headers in non default locations t…

…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
timlinux committed Mar 8, 2008
1 parent 36cfbef commit 193448a7dab177e1660f61af1d0596461933a81c
Showing with 12 additions and 3 deletions.
  1. +12 −3 cmake/FindExpat.cmake
@@ -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)

0 comments on commit 193448a

Please sign in to comment.
You can’t perform that action at this time.