Skip to content
Snippets Groups Projects
Commit 4f0eb0a4 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'FindSQLite3-pkg-config' into release-3.31


2d228201 Help: Guard calls to pkg_check_modules in cmake-developer(7) example
674a9878 FindSQLite3: Guard calls to pkg_check_modules

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !9983
parents ab6a317c 2d228201
No related branches found
No related tags found
No related merge requests found
......@@ -408,7 +408,9 @@ starting point.
.. code-block:: cmake
find_package(PkgConfig)
pkg_check_modules(PC_Foo QUIET Foo)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_Foo QUIET Foo)
endif()
This should define some variables starting ``PC_Foo_`` that contain the
information from the ``Foo.pc`` file.
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment