Skip to content

Commit 29b32fe

Browse files
author
timlinux
committedMar 16, 2008
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@8225 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 1cdd141 commit 29b32fe

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed
 

‎cmake/FindSqlite3.cmake

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,27 @@
77
# SQLITE3_LIBRARY
88

99

10+
# Normally there is no need to specify /usr/... paths because
11+
# cmake will look there automatically. However the NO_DEFAULT_PATH
12+
# prevents this behaviour allowing you to use no standard file
13+
# locations in preference over standard ones. Note in this case
14+
# you then need to explicitly add /usr and /usr/local prefixes
15+
# to the search list. This applies both to FIND_PATH and FIND_LIBRARY
1016
FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h
17+
"$ENV{LIB_DIR}/include/sqlite"
1118
/usr/local/include
1219
/usr/include
13-
#msvc
14-
"$ENV{LIB_DIR}/include/sqlite"
1520
#mingw
1621
c:/msys/local/include
22+
NO_DEFAULT_PATH
1723
)
1824

1925
FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 PATHS
26+
"$ENV{LIB_DIR}/lib"
2027
/usr/local/lib
2128
/usr/lib
2229
c:/msys/local/lib
23-
#msvc
24-
"$ENV{LIB_DIR}/lib"
30+
NO_DEFAULT_PATH
2531
)
2632

2733
IF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)

0 commit comments

Comments
 (0)
Please sign in to comment.