8000 Find a better way for sqlite3 search pathes · VXAPPS/sqlite_functions@de3d476 · GitHub
[go: up one dir, main page]

Skip to content

Commit de3d476

Browse files
committed
Find a better way for sqlite3 search pathes
1 parent b2a7b54 commit de3d476

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cmake/modules/FindSQLite3.cmake

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
#
1515
###############################################################################
1616

17+
find_package(PkgConfig QUIET)
18+
pkg_check_modules(PC_SQLite3 QUIET sqlite3)
19+
1720
set(SQLITE3_INCLUDE_SEARCH_PATHS
21+
${PC_SQLite3_INCLUDE_DIRS}
1822
/usr/include
1923
/usr/local/include
2024
$ENV{LIB_DIR}/include
@@ -26,10 +30,12 @@ set(SQLITE3_INCLUDE_SEARCH_PATHS
2630
$ENV{SystemDrive}/SQLite3/*/include
2731
$ENV{SQLITE_ROOT}/include
2832
${SQLITE_ROOT_DIR}/include
29-
$ENV{OSGEO4W_ROOT}/include)
33+
$ENV{OSGEO4W_ROOT}/include
34+
)
3035

3136

3237
set(SQLITE3_LIB_SEARCH_PATHS
38+
${PC_SQLite3_LIBRARY_DIRS}
3339
/usr/lib
3440
/usr/local/lib
3541
$ENV{LIB_DIR}/lib
@@ -39,7 +45,8 @@ set(SQLITE3_LIB_SEARCH_PATHS
3945
$ENV{SystemDrive}/SQLite3/*/lib
4046
$ENV{SQLITE_ROOT}/lib
4147
${SQLITE_ROOT_DIR}/lib
42-
$ENV{OSGEO4W_ROOT}/lib)
48+
$ENV{OSGEO4W_ROOT}/lib
49+
)
4350

4451
if (APPLE)
4552
# on macOS, we try hard to prefer aftermarket sqlite3 installations, as the system sqlite3

0 commit comments

Comments
 (0)
0