Warning, /frameworks/extra-cmake-modules/tests/ECMQmlModuleTest/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # 0002 # SPDX-FileCopyrightText: 2021 Arjen Hiemstra <ahiemstra@heimr.nl> 0003 # 0004 # SPDX-License-Identifier: BSD-3-Clause 0005 0006 cmake_minimum_required(VERSION 3.5) 0007 project(extra-cmake-modules) 0008 0009 set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../modules) 0010 set(CMAKE_MODULE_PATH "${ECM_FIND_MODULE_DIR}" "${ECM_MODULE_DIR}") 0011 include(QtVersionOption) 0012 0013 find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS Qml) 0014 include(ECMQmlModule) 0015 0016 if(QML_ONLY) 0017 ecm_add_qml_module(TestModule URI Test NO_PLUGIN) 0018 else() 0019 ecm_add_qml_module(TestModule URI Test) 0020 target_sources(TestModule PRIVATE qmlmodule.cpp) 0021 target_link_libraries(TestModule Qt${QT_MAJOR_VERSION}::Qml) 0022 endif() 0023 0024 if (DEPENDS) 0025 ecm_add_qml_module_dependencies(TestModule DEPENDS OtherTest) 0026 endif() 0027 0028 ecm_target_qml_sources(TestModule SOURCES QmlModule.qml) 0029 0030 ecm_finalize_qml_module(TestModule DESTINATION "test") 0031 0032 # this will be run by CTest 0033 configure_file(check.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check.cmake" @ONLY)