summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2024-03-26 12:08:00 (GMT)
committerPeter Kokot <peterkokot@gmail.com>2024-03-26 12:08:00 (GMT)
commitfb30b184372efcaa104ca9aa5829af2d85f643a4 (patch)
tree4dac52e63512bbf14aca0ae37db0855708c15d16
parent41de1c3813b4caf37b9b2ca9ba560ec2dd59ad7a (diff)
downloadCMake-fb30b184372efcaa104ca9aa5829af2d85f643a4.zip
CMake-fb30b184372efcaa104ca9aa5829af2d85f643a4.tar.gz
CMake-fb30b184372efcaa104ca9aa5829af2d85f643a4.tar.bz2
FindSQLite3: Use pkg-config for SQLite3 hints
-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