diff options
Diffstat (limited to 'tests/ECMQmlModuleTest/CMakeLists.txt')
-rw-r--r-- | tests/ECMQmlModuleTest/CMakeLists.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/ECMQmlModuleTest/CMakeLists.txt b/tests/ECMQmlModuleTest/CMakeLists.txt new file mode 100644 index 00000000..49d76594 --- /dev/null +++ b/tests/ECMQmlModuleTest/CMakeLists.txt @@ -0,0 +1,32 @@ +# +# SPDX-FileCopyrightText: 2021 Arjen Hiemstra <ahiemstra@heimr.nl> +# +# SPDX-License-Identifier: BSD-3-Clause + +project(extra-cmake-modules) +cmake_minimum_required(VERSION 3.5) + +set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../modules) +set(CMAKE_MODULE_PATH "${ECM_FIND_MODULE_DIR}" "${ECM_MODULE_DIR}") + +find_package(Qt5 REQUIRED COMPONENTS Qml) +include(ECMQmlModule) + +if(QML_ONLY) + ecm_add_qml_module(TestModule URI Test NO_PLUGIN) +else() + ecm_add_qml_module(TestModule URI Test) + target_sources(TestModule PRIVATE qmlmodule.cpp) + target_link_libraries(TestModule Qt5::Qml) +endif() + +if (DEPENDS) + ecm_add_qml_module_dependencies(TestModule DEPENDS OtherTest) +endif() + +ecm_target_qml_sources(TestModule SOURCES QmlModule.qml) + +ecm_finalize_qml_module(TestModule DESTINATION "test") + +# this will be run by CTest +configure_file(check.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check.cmake" @ONLY) |