From e5301edf1daf06aa862eb5ccae5ede72d7717fe0 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 3 Aug 2017 16:06:47 +0200 Subject: Include a module for finding qml imports as runtime dependencies Summary: Allows to check if a module is available on the system and sets it as a runtime dependency. This is useful for projects so that they can specify their qml dependencies easily and packagers and developers get to see what's missing by looking at the cmake output. Reviewers: #build_system, #frameworks, sitter Reviewed By: sitter Subscribers: dfaure, aacid Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D7094 --- tests/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7ebcf9b5..cabbe05a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -211,3 +211,16 @@ if (Qt5Core_FOUND AND Qt5LinguistTools_FOUND) ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ECMPoQmToolsTest/check.cmake" ) endif() + +find_package(Qt5Quick CONFIG) +set_package_properties( + Qt5Quick + PROPERTIES + URL "http://www.qt.io/" + DESCRIPTION "Qt5 Quick library." + TYPE OPTIONAL + PURPOSE "Required to run tests for the ECMQMLModules module." +) +if (TARGET Qt5::Quick) + add_test_macro(ECMQMLModules dummy) +endif() -- cgit v1.2.1