summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-03-27 12:15:11 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-03-27 12:15:37 (GMT)
commit209c0ff56c3ff02705007e544b115668feb709c9 (patch)
tree76d089c0f82076895026b0945f018c8108137d52 /Modules
parentc3695c6b38088d93e4a3c985b59aed52f7cd751b (diff)
parentfb30b184372efcaa104ca9aa5829af2d85f643a4 (diff)
downloadCMake-209c0ff56c3ff02705007e544b115668feb709c9.zip
CMake-209c0ff56c3ff02705007e544b115668feb709c9.tar.gz
CMake-209c0ff56c3ff02705007e544b115668feb709c9.tar.bz2
Merge topic 'patch-find-sqlite3'
fb30b18437 FindSQLite3: Use pkg-config for SQLite3 hints Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9374
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindSQLite3.cmake13
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/FindSQLite3.cmake b/Modules/FindSQLite3.cmake
index 88c7dd2..e8d6b40 100644
--- a/Modules/FindSQLite3.cmake
+++ b/Modules/FindSQLite3.cmake
@@ -32,12 +32,21 @@ This module will set the following variables if found:
#]=======================================================================]
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_SQLite3 QUIET sqlite3)
+
# Look for the necessary header
-find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h)
+find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h
+ HINTS
+ ${PC_SQLite3_INCLUDE_DIRS}
+)
mark_as_advanced(SQLite3_INCLUDE_DIR)
# Look for the necessary library
-find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite)
+find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite
+ HINTS
+ ${PC_SQLite3_LIBRARY_DIRS}
+)
mark_as_advanced(SQLite3_LIBRARY)
# Extract version information from the header file