Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8225 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Mar 16, 2008
1 parent ff1b348 commit 126bb2e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cmake/FindSqlite3.cmake
Expand Up @@ -7,21 +7,27 @@
# 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
"$ENV{LIB_DIR}/include/sqlite"
/usr/local/include
/usr/include
#msvc
"$ENV{LIB_DIR}/include/sqlite"
#mingw
c:/msys/local/include
NO_DEFAULT_PATH
)

FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 PATHS
"$ENV{LIB_DIR}/lib"
/usr/local/lib
/usr/lib
c:/msys/local/lib
#msvc
"$ENV{LIB_DIR}/lib"
NO_DEFAULT_PATH
)

IF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
Expand Down

0 comments on commit 126bb2e

Please sign in to comment.