diff options
Diffstat (limited to 'src/webchannel/CMakeLists.txt')
-rw-r--r-- | src/webchannel/CMakeLists.txt | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/src/webchannel/CMakeLists.txt b/src/webchannel/CMakeLists.txt index 9354973..fd5c08b 100644 --- a/src/webchannel/CMakeLists.txt +++ b/src/webchannel/CMakeLists.txt @@ -1,13 +1,8 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -# Generated from webchannel.pro. - -##################################################################### -## WebChannel Module: -##################################################################### - qt_internal_add_module(WebChannel + GENERATE_CPP_EXPORTS SOURCES qmetaobjectpublisher.cpp qmetaobjectpublisher_p.h qwebchannel.cpp qwebchannel.h qwebchannel_p.h @@ -16,49 +11,26 @@ qt_internal_add_module(WebChannel qwebchannelglobal.h LIBRARIES Qt::CorePrivate - PUBLIC_LIBRARIES - Qt::Core - PRIVATE_MODULE_INTERFACE - Qt::CorePrivate - GENERATE_CPP_EXPORTS ) -# Resources: -set_source_files_properties("../../examples/webchannel/shared/qwebchannel.js" - PROPERTIES QT_RESOURCE_ALIAS "qwebchannel.js" -) -set(resources_resource_files - "../../examples/webchannel/shared/qwebchannel.js" +set(resource_file "../../examples/webchannel/shared/qwebchannel.js") +set_source_files_properties(${resource_file} PROPERTIES + QT_RESOURCE_ALIAS "qwebchannel.js" ) -set_source_files_properties(${resources_resource_files} PROPERTIES QT_SKIP_QUICKCOMPILER 1) - qt_internal_add_resource(WebChannel "resources" PREFIX "/qtwebchannel/" FILES - ${resources_resource_files} + ${resource_file} ) +if(TARGET Qt::Qml) + qt_internal_extend_target(WebChannel PUBLIC_LIBRARIES Qt::Qml) +else() + qt_internal_extend_target(WebChannel DEFINES QT_NO_JSVALUE) +endif() -#### Keys ignored in scope 1:.:.:webchannel.pro:<TRUE>: -# OTHER_FILES = "qwebchannel.js" - -## Scopes: -##################################################################### - -qt_internal_extend_target(WebChannel CONDITION TARGET Qt::Qml - SOURCES - qqmlwebchannel.cpp qqmlwebchannel.h - qqmlwebchannelattached.cpp qqmlwebchannelattached_p.h - PUBLIC_LIBRARIES - Qt::Qml -) - -qt_internal_extend_target(WebChannel CONDITION NOT TARGET Qt::Qml - DEFINES - QT_NO_JSVALUE -) qt_internal_add_docs(WebChannel doc/qtwebchannel.qdocconf ) |