summaryrefslogtreecommitdiffstats
path: root/Modules/FindSQLite3.cmake
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2024-11-09 17:43:25 (GMT)
committerBrad King <brad.king@kitware.com>2024-11-11 15:53:21 (GMT)
commit674a9878983f223dd4855696852ba50f026556d1 (patch)
tree710071368d0943f84bafbf31c4e56ebfa3e67de5 /Modules/FindSQLite3.cmake
parente22c8383b9ae4f27a78f7a8849693c03ca29c7bb (diff)
downloadCMake-674a9878983f223dd4855696852ba50f026556d1.zip
CMake-674a9878983f223dd4855696852ba50f026556d1.tar.gz
CMake-674a9878983f223dd4855696852ba50f026556d1.tar.bz2
FindSQLite3: Guard calls to pkg_check_modules
This was missed in commit 25b947589a (Modules: Guard calls to pkg_check_modules, 2024-08-07, v3.31.0-rc1~236^2).
Diffstat (limited to 'Modules/FindSQLite3.cmake')
-rw-r--r--Modules/FindSQLite3.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindSQLite3.cmake b/Modules/FindSQLite3.cmake
index 308a444..e5fead7 100644
--- a/Modules/FindSQLite3.cmake
+++ b/Modules/FindSQLite3.cmake
@@ -36,7 +36,9 @@ cmake_policy(PUSH)
cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_<n>
find_package(PkgConfig QUIET)
-pkg_check_modules(PC_SQLite3 QUIET sqlite3)
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_SQLite3 QUIET sqlite3)
+endif()
# Look for the necessary header
find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h