From ad82815e5a3578aedbc1ded255e6d6b5532f6ded Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 25 Nov 2020 18:18:35 +0100 Subject: CMake: Update project to use latest CMake API Also make Quick an optional package. Also update qtdeclarative dependency to latest integrated sha1 in qt5.git Change-Id: I851f825abc9484b5bda6cd60eca6ddb1b0d8e2b7 Reviewed-by: Qt CI Bot Reviewed-by: Joerg Bornemann --- CMakeLists.txt | 3 ++- dependencies.yaml | 2 +- src/effects/CMakeLists.txt | 6 +++--- src/effects/private/CMakeLists.txt | 2 +- tests/auto/CMakeLists.txt | 2 +- tests/manual/smooth/CMakeLists.txt | 4 ++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7de02e..85a3a47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,8 @@ project(QtGraphicalEffects # special case LANGUAGES CXX C ) -find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Quick) # special case +find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) # special case +find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Quick) if(NOT TARGET Qt::Quick) message(NOTICE "Skipping the build as the condition \"TARGET Qt::Quick\" is not met.") diff --git a/dependencies.yaml b/dependencies.yaml index 5740d0b..b6f7ea2 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -1,4 +1,4 @@ dependencies: ../qtdeclarative: - ref: bb61349080e34f154e8b2094f4765f42b2ae8c40 + ref: 861d93965e0dbc2c088e83f8a6093a639373a02c required: true diff --git a/src/effects/CMakeLists.txt b/src/effects/CMakeLists.txt index d81355a..cf66a9c 100644 --- a/src/effects/CMakeLists.txt +++ b/src/effects/CMakeLists.txt @@ -4,7 +4,7 @@ ## qtgraphicaleffectsplugin Plugin: ##################################################################### -add_qml_module(qtgraphicaleffectsplugin +qt_internal_add_qml_module(qtgraphicaleffectsplugin URI "QtGraphicalEffects" VERSION "1.${CMAKE_PROJECT_VERSION_MINOR}" DESIGNER_SUPPORTED @@ -47,7 +47,7 @@ set(qtgraphicaleffectsshaders_resource_files "shaders_ng/thresholdmask.frag.qsb" ) -add_qt_resource(qtgraphicaleffectsplugin "qtgraphicaleffectsshaders" +qt_internal_add_resource(qtgraphicaleffectsplugin "qtgraphicaleffectsshaders" PREFIX "/qt-project.org/imports/QtGraphicalEffects" FILES @@ -136,7 +136,7 @@ qt6_target_qml_files(qtgraphicaleffectsplugin FILES ${qml_files} ) -add_qt_docs(qtgraphicaleffectsplugin +qt_internal_add_docs(qtgraphicaleffectsplugin doc/qtgraphicaleffects.qdocconf ) diff --git a/src/effects/private/CMakeLists.txt b/src/effects/private/CMakeLists.txt index a75eda4..b8e0e5b 100644 --- a/src/effects/private/CMakeLists.txt +++ b/src/effects/private/CMakeLists.txt @@ -4,7 +4,7 @@ ## qtgraphicaleffectsprivate Plugin: ##################################################################### -qt_add_qml_module(qtgraphicaleffectsprivate +qt_internal_add_qml_module(qtgraphicaleffectsprivate URI "QtGraphicalEffects.private" VERSION "${CMAKE_PROJECT_VERSION}" CLASSNAME QtGraphicalEffectsPrivatePlugin diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt index 1c2a2cb..fad899f 100644 --- a/tests/auto/CMakeLists.txt +++ b/tests/auto/CMakeLists.txt @@ -4,7 +4,7 @@ ## tst_qtgraphicaleffects Test: ##################################################################### -qt_add_test(tst_qtgraphicaleffects +qt_internal_add_test(tst_qtgraphicaleffects SOURCES tst_qtgraphicaleffects.cpp PUBLIC_LIBRARIES diff --git a/tests/manual/smooth/CMakeLists.txt b/tests/manual/smooth/CMakeLists.txt index 3efec4a..9912fcf 100644 --- a/tests/manual/smooth/CMakeLists.txt +++ b/tests/manual/smooth/CMakeLists.txt @@ -4,7 +4,7 @@ ## smooth Binary: ##################################################################### -qt_add_manual_test(smooth +qt_internal_add_manual_test(smooth GUI SOURCES main.cpp @@ -23,7 +23,7 @@ set(resources_resource_files "star.png" ) -qt_add_resource(smooth "resources" +qt_internal_add_resource(smooth "resources" PREFIX "/" FILES -- cgit v1.2.1