summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE.cmake
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2015-09-18 01:05:29 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-21 13:39:26 (GMT)
commit51b83f1445521a210eee7e92ed03aff8fe8e9dc6 (patch)
tree1326ba549ff9679f032bf86fd02a6ecb0e2e144f /Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE.cmake
parent7f7f1eecfd6834b8a499f0fde49469a10a1b2905 (diff)
downloadCMake-51b83f1445521a210eee7e92ed03aff8fe8e9dc6.zip
CMake-51b83f1445521a210eee7e92ed03aff8fe8e9dc6.tar.gz
CMake-51b83f1445521a210eee7e92ed03aff8fe8e9dc6.tar.bz2
FindPkgConfig: add a command to query arbitrary variables
Diffstat (limited to 'Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE.cmake')
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE.cmake
new file mode 100644
index 0000000..c85efaa
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE.cmake
@@ -0,0 +1,9 @@
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GOBJECT_INTROSPECTION QUIET gobject-introspection-1.0)
+
+if (GOBJECT_INTROSPECTION_FOUND)
+ pkg_get_variable(g_ir_scanner gobject-introspection-1.0 g_ir_scanner)
+ message(STATUS "g_ir_scanner: ${g_ir_scanner}")
+else ()
+ message(STATUS "g_ir_scanner: skipping test; gobject-introspection-1.0 not found /g-ir-scanner")
+endif ()