diff options
| author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-12 15:27:58 +0100 |
|---|---|---|
| committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-12 15:28:15 +0100 |
| commit | 8592ae4096f3f9c2b08b87ad2fcbbbfadf75f2d7 (patch) | |
| tree | a757c1d80ec77952eae2cc4de5d89c01f14760fc /src/qml | |
| parent | e7decc7637e9eb7e66a0d19705090f18488028c0 (diff) | |
| parent | 14492ecee2e34843efd3ef070503a43a48552055 (diff) | |
Merge remote-tracking branch 'origin/wip/cmake' into dev
Conflicts:
dependencies.yaml
Change-Id: Ifff48b9d0e7962d481e63c49399e2d304e1011e5
Diffstat (limited to 'src/qml')
| -rw-r--r-- | src/qml/.prev_CMakeLists.txt | 619 | ||||
| -rw-r--r-- | src/qml/CMakeLists.txt | 628 | ||||
| -rw-r--r-- | src/qml/Qt6QmlBuildInternals.cmake | 174 | ||||
| -rw-r--r-- | src/qml/Qt6QmlMacros.cmake | 583 | ||||
| -rw-r--r-- | src/qml/configure.cmake | 189 | ||||
| -rw-r--r-- | src/qml/qml/qqmlengine.cpp | 2 | ||||
| -rw-r--r-- | src/qml/qml/qqmlparserstatus.cpp | 2 |
7 files changed, 2195 insertions, 2 deletions
diff --git a/src/qml/.prev_CMakeLists.txt b/src/qml/.prev_CMakeLists.txt new file mode 100644 index 0000000000..9528b3068a --- /dev/null +++ b/src/qml/.prev_CMakeLists.txt @@ -0,0 +1,619 @@ +# Generated from qml.pro. + +##################################################################### +## Qml Module: +##################################################################### + +qt_add_module(Qml + GENERATE_METATYPES + PLUGIN_TYPES qmltooling + SOURCES + ../3rdparty/masm/assembler/*.h + ../3rdparty/masm/assembler/ARMv7Assembler.cpp + ../3rdparty/masm/assembler/LinkBuffer.cpp + ../3rdparty/masm/disassembler/ARM64/A64DOpcode.cpp ../3rdparty/masm/disassembler/ARM64/A64DOpcode.h + ../3rdparty/masm/disassembler/ARM64Disassembler.cpp + ../3rdparty/masm/disassembler/ARMv7/ARMv7DOpcode.cpp ../3rdparty/masm/disassembler/ARMv7/ARMv7DOpcode.h + ../3rdparty/masm/disassembler/ARMv7Disassembler.cpp + ../3rdparty/masm/disassembler/Disassembler.cpp + ../3rdparty/masm/disassembler/Mips32Disassembler.cpp + ../3rdparty/masm/disassembler/UDis86Disassembler.cpp + ../3rdparty/masm/disassembler/mips32/Mips32Opcode.cpp ../3rdparty/masm/disassembler/mips32/Mips32Opcode.h + ../3rdparty/masm/stubs/Options.cpp + ../3rdparty/masm/stubs/WTFStubs.cpp ../3rdparty/masm/stubs/WTFStubs.h + ../3rdparty/masm/stubs/wtf/FastAllocBase.h + ../3rdparty/masm/stubs/wtf/FastMalloc.h + ../3rdparty/masm/stubs/wtf/Noncopyable.h + ../3rdparty/masm/stubs/wtf/OwnPtr.h + ../3rdparty/masm/stubs/wtf/PassOwnPtr.h + ../3rdparty/masm/stubs/wtf/PassRefPtr.h + ../3rdparty/masm/stubs/wtf/RefCounted.h + ../3rdparty/masm/stubs/wtf/RefPtr.h + ../3rdparty/masm/stubs/wtf/TypeTraits.h + ../3rdparty/masm/stubs/wtf/UnusedParam.h + ../3rdparty/masm/stubs/wtf/Vector.h + ../3rdparty/masm/stubs/yarr/YarrUnicodeProperties.cpp + ../3rdparty/masm/wtf/*.h + ../3rdparty/masm/wtf/FilePrintStream.cpp ../3rdparty/masm/wtf/FilePrintStream.h + ../3rdparty/masm/wtf/OSAllocator.h + ../3rdparty/masm/wtf/PageAllocation.h + ../3rdparty/masm/wtf/PageAllocationAligned.cpp ../3rdparty/masm/wtf/PageAllocationAligned.h + ../3rdparty/masm/wtf/PageBlock.cpp ../3rdparty/masm/wtf/PageBlock.h + ../3rdparty/masm/wtf/PageReservation.h + ../3rdparty/masm/wtf/PrintStream.cpp ../3rdparty/masm/wtf/PrintStream.h + ../3rdparty/masm/wtf/RawPointer.h + ../3rdparty/masm/yarr/Yarr.h + ../3rdparty/masm/yarr/YarrCanonicalizeUCS2.cpp ../3rdparty/masm/yarr/YarrCanonicalizeUCS2.h + ../3rdparty/masm/yarr/YarrCanonicalizeUnicode.cpp + ../3rdparty/masm/yarr/YarrInterpreter.cpp ../3rdparty/masm/yarr/YarrInterpreter.h + ../3rdparty/masm/yarr/YarrJIT.cpp ../3rdparty/masm/yarr/YarrJIT.h + ../3rdparty/masm/yarr/YarrParser.h + ../3rdparty/masm/yarr/YarrPattern.cpp ../3rdparty/masm/yarr/YarrPattern.h + ../3rdparty/masm/yarr/YarrSyntaxChecker.cpp ../3rdparty/masm/yarr/YarrSyntaxChecker.h + ../3rdparty/masm/yarr/YarrUnicodeProperties.h + common/qqmlapiversion_p.h + common/qqmljsdiagnosticmessage_p.h + common/qqmljsfixedpoolarray_p.h + common/qqmljsmemorypool_p.h + common/qqmljssourcelocation_p.h + common/qv4alloca_p.h + common/qv4calldata_p.h + common/qv4compileddata_p.h + common/qv4staticvalue_p.h + common/qv4stringtoarrayindex_p.h + compiler/qqmlirbuilder.cpp compiler/qqmlirbuilder_p.h + compiler/qv4bytecodegenerator.cpp compiler/qv4bytecodegenerator_p.h + compiler/qv4bytecodehandler.cpp compiler/qv4bytecodehandler_p.h + compiler/qv4codegen.cpp compiler/qv4codegen_p.h + compiler/qv4compiler.cpp compiler/qv4compiler_p.h + compiler/qv4compilercontext.cpp compiler/qv4compilercontext_p.h + compiler/qv4compilercontrolflow_p.h + compiler/qv4compilerglobal_p.h + compiler/qv4compilerscanfunctions.cpp compiler/qv4compilerscanfunctions_p.h + compiler/qv4instr_moth.cpp compiler/qv4instr_moth_p.h + compiler/qv4util_p.h + debugger/qqmldebug.h + debugger/qqmldebugconnector_p.h + debugger/qqmldebugserviceinterfaces_p.h + debugger/qqmldebugstatesdelegate_p.h + debugger/qqmlprofiler_p.h + inlinecomponentutils_p.h + jsapi/qjsengine.cpp jsapi/qjsengine.h jsapi/qjsengine_p.h + jsapi/qjsvalue.cpp jsapi/qjsvalue.h jsapi/qjsvalue_p.h + jsapi/qjsvalueiterator.cpp jsapi/qjsvalueiterator.h jsapi/qjsvalueiterator_p.h + jsruntime/qv4argumentsobject.cpp jsruntime/qv4argumentsobject_p.h + jsruntime/qv4arraybuffer.cpp jsruntime/qv4arraybuffer_p.h + jsruntime/qv4arraydata.cpp jsruntime/qv4arraydata_p.h + jsruntime/qv4arrayiterator.cpp jsruntime/qv4arrayiterator_p.h + jsruntime/qv4arrayobject.cpp jsruntime/qv4arrayobject_p.h + jsruntime/qv4atomics.cpp jsruntime/qv4atomics_p.h + jsruntime/qv4booleanobject.cpp jsruntime/qv4booleanobject_p.h + jsruntime/qv4compilationunitmapper.cpp jsruntime/qv4compilationunitmapper_p.h + jsruntime/qv4context.cpp jsruntime/qv4context_p.h + jsruntime/qv4dataview.cpp jsruntime/qv4dataview_p.h + jsruntime/qv4dateobject.cpp jsruntime/qv4dateobject_p.h + jsruntime/qv4debugging_p.h + jsruntime/qv4engine.cpp jsruntime/qv4engine_p.h + jsruntime/qv4enginebase_p.h + jsruntime/qv4errorobject.cpp jsruntime/qv4errorobject_p.h + jsruntime/qv4estable.cpp jsruntime/qv4estable_p.h + jsruntime/qv4executableallocator.cpp jsruntime/qv4executableallocator_p.h + jsruntime/qv4executablecompilationunit.cpp jsruntime/qv4executablecompilationunit_p.h + jsruntime/qv4function.cpp jsruntime/qv4function_p.h + jsruntime/qv4functionobject.cpp jsruntime/qv4functionobject_p.h + jsruntime/qv4functiontable_p.h + jsruntime/qv4generatorobject.cpp jsruntime/qv4generatorobject_p.h + jsruntime/qv4global_p.h + jsruntime/qv4globalobject.cpp jsruntime/qv4globalobject_p.h + jsruntime/qv4identifier.cpp jsruntime/qv4identifier_p.h + jsruntime/qv4identifiertable.cpp jsruntime/qv4identifiertable_p.h + jsruntime/qv4include.cpp jsruntime/qv4include_p.h + jsruntime/qv4internalclass.cpp jsruntime/qv4internalclass_p.h + jsruntime/qv4iterator.cpp jsruntime/qv4iterator_p.h + jsruntime/qv4jscall_p.h + jsruntime/qv4jsonobject.cpp jsruntime/qv4jsonobject_p.h + jsruntime/qv4lookup.cpp jsruntime/qv4lookup_p.h + jsruntime/qv4managed.cpp jsruntime/qv4managed_p.h + jsruntime/qv4mapiterator.cpp jsruntime/qv4mapiterator_p.h + jsruntime/qv4mapobject.cpp jsruntime/qv4mapobject_p.h + jsruntime/qv4math_p.h + jsruntime/qv4mathobject.cpp jsruntime/qv4mathobject_p.h + jsruntime/qv4memberdata.cpp jsruntime/qv4memberdata_p.h + jsruntime/qv4module.cpp jsruntime/qv4module_p.h + jsruntime/qv4numberobject.cpp jsruntime/qv4numberobject_p.h + jsruntime/qv4object.cpp jsruntime/qv4object_p.h + jsruntime/qv4objectiterator.cpp jsruntime/qv4objectiterator_p.h + jsruntime/qv4objectproto.cpp jsruntime/qv4objectproto_p.h + jsruntime/qv4persistent.cpp jsruntime/qv4persistent_p.h + jsruntime/qv4profiling_p.h + jsruntime/qv4promiseobject.cpp jsruntime/qv4promiseobject_p.h + jsruntime/qv4property_p.h + jsruntime/qv4propertykey.cpp jsruntime/qv4propertykey_p.h + jsruntime/qv4proxy.cpp jsruntime/qv4proxy_p.h + jsruntime/qv4qmlcontext.cpp jsruntime/qv4qmlcontext_p.h + jsruntime/qv4qobjectwrapper.cpp jsruntime/qv4qobjectwrapper_p.h + jsruntime/qv4reflect.cpp jsruntime/qv4reflect_p.h + jsruntime/qv4regexp.cpp jsruntime/qv4regexp_p.h + jsruntime/qv4regexpobject.cpp jsruntime/qv4regexpobject_p.h + jsruntime/qv4runtime.cpp jsruntime/qv4runtime_p.h + jsruntime/qv4runtimeapi_p.h + jsruntime/qv4runtimecodegen.cpp jsruntime/qv4runtimecodegen_p.h + jsruntime/qv4scopedvalue_p.h + jsruntime/qv4script.cpp jsruntime/qv4script_p.h + jsruntime/qv4setiterator.cpp jsruntime/qv4setiterator_p.h + jsruntime/qv4setobject.cpp jsruntime/qv4setobject_p.h + jsruntime/qv4sparsearray.cpp jsruntime/qv4sparsearray_p.h + jsruntime/qv4stackframe.cpp jsruntime/qv4stackframe_p.h + jsruntime/qv4string.cpp jsruntime/qv4string_p.h + jsruntime/qv4stringiterator.cpp jsruntime/qv4stringiterator_p.h + jsruntime/qv4stringobject.cpp jsruntime/qv4stringobject_p.h + jsruntime/qv4symbol.cpp jsruntime/qv4symbol_p.h + jsruntime/qv4typedarray.cpp jsruntime/qv4typedarray_p.h + jsruntime/qv4value.cpp jsruntime/qv4value_p.h + jsruntime/qv4variantobject.cpp jsruntime/qv4variantobject_p.h + jsruntime/qv4vme_moth.cpp jsruntime/qv4vme_moth_p.h + jsruntime/qv4vtable_p.h + memory/qv4heap_p.h + memory/qv4mm.cpp memory/qv4mm_p.h + memory/qv4mmdefs_p.h + memory/qv4writebarrier_p.h + parser/qqmljsast.cpp parser/qqmljsast_p.h + parser/qqmljsastfwd_p.h + parser/qqmljsastvisitor.cpp parser/qqmljsastvisitor_p.h + parser/qqmljsengine_p.cpp parser/qqmljsengine_p.h + parser/qqmljsglobal_p.h + parser/qqmljskeywords_p.h + parser/qqmljslexer.cpp parser/qqmljslexer_p.h + qml/ftw/qbitfield_p.h + qml/ftw/qfieldlist_p.h + qml/ftw/qfinitestack_p.h + qml/ftw/qflagpointer_p.h + qml/ftw/qhashedstring.cpp qml/ftw/qhashedstring_p.h + qml/ftw/qintrusivelist.cpp qml/ftw/qintrusivelist_p.h + qml/ftw/qlazilyallocated_p.h + qml/ftw/qlinkedstringhash_p.h + qml/ftw/qpodvector_p.h + qml/ftw/qprimefornumbits_p.h + qml/ftw/qqmlnullablevalue_p.h + qml/ftw/qqmlrefcount_p.h + qml/ftw/qqmlthread.cpp qml/ftw/qqmlthread_p.h + qml/ftw/qrecursionwatcher_p.h + qml/ftw/qrecyclepool_p.h + qml/ftw/qstringhash_p.h + qml/qqml.cpp qml/qqml.h + qml/qqmlabstractbinding.cpp qml/qqmlabstractbinding_p.h + qml/qqmlabstracturlinterceptor.cpp qml/qqmlabstracturlinterceptor.h + qml/qqmlapplicationengine.cpp qml/qqmlapplicationengine.h qml/qqmlapplicationengine_p.h + qml/qqmlbinding.cpp qml/qqmlbinding_p.h + qml/qqmlboundsignal.cpp qml/qqmlboundsignal_p.h + qml/qqmlboundsignalexpressionpointer_p.h + qml/qqmlcleanup.cpp qml/qqmlcleanup_p.h + qml/qqmlcomponent.cpp qml/qqmlcomponent.h qml/qqmlcomponent_p.h + qml/qqmlcomponentattached_p.h + qml/qqmlcontext.cpp qml/qqmlcontext.h qml/qqmlcontext_p.h + qml/qqmlcustomparser.cpp qml/qqmlcustomparser_p.h + qml/qqmldata_p.h + qml/qqmldatablob.cpp qml/qqmldatablob_p.h + qml/qqmldelayedcallqueue.cpp qml/qqmldelayedcallqueue_p.h + qml/qqmldirdata.cpp qml/qqmldirdata_p.h + qml/qqmlengine.cpp qml/qqmlengine.h qml/qqmlengine_p.h + qml/qqmlenumdata_p.h + qml/qqmlenumvalue_p.h + qml/qqmlerror.cpp qml/qqmlerror.h + qml/qqmlexpression.cpp qml/qqmlexpression.h qml/qqmlexpression_p.h + qml/qqmlextensioninterface.h + qml/qqmlextensionplugin.cpp qml/qqmlextensionplugin.h qml/qqmlextensionplugin_p.h + qml/qqmlfile.cpp qml/qqmlfile.h + qml/qqmlfileselector.cpp qml/qqmlfileselector.h qml/qqmlfileselector_p.h + qml/qqmlglobal.cpp qml/qqmlglobal_p.h + qml/qqmlguard_p.h + qml/qqmlimport.cpp qml/qqmlimport_p.h + qml/qqmlincubator.cpp qml/qqmlincubator.h qml/qqmlincubator_p.h + qml/qqmlinfo.cpp qml/qqmlinfo.h + qml/qqmlirloader.cpp qml/qqmlirloader_p.h + qml/qqmljavascriptexpression.cpp qml/qqmljavascriptexpression_p.h + qml/qqmllist.cpp qml/qqmllist.h qml/qqmllist_p.h + qml/qqmllistwrapper.cpp qml/qqmllistwrapper_p.h + qml/qqmlloggingcategory.cpp qml/qqmlloggingcategory_p.h + qml/qqmlmetaobject.cpp qml/qqmlmetaobject_p.h + qml/qqmlmetatype.cpp qml/qqmlmetatype_p.h + qml/qqmlmetatypedata.cpp qml/qqmlmetatypedata_p.h + qml/qqmlmoduleregistration.cpp qml/qqmlmoduleregistration.h + qml/qqmlnetworkaccessmanagerfactory.cpp qml/qqmlnetworkaccessmanagerfactory.h + qml/qqmlnotifier.cpp qml/qqmlnotifier_p.h + qml/qqmlobjectcreator.cpp qml/qqmlobjectcreator_p.h + qml/qqmlobjectorgadget.cpp qml/qqmlobjectorgadget_p.h + qml/qqmlopenmetaobject.cpp qml/qqmlopenmetaobject_p.h + qml/qqmlparserstatus.cpp qml/qqmlparserstatus.h + qml/qqmlplatform.cpp qml/qqmlplatform_p.h + qml/qqmlprivate.h + qml/qqmlproperty.cpp qml/qqmlproperty.h qml/qqmlproperty_p.h + qml/qqmlpropertycache.cpp qml/qqmlpropertycache_p.h + qml/qqmlpropertycachecreator.cpp qml/qqmlpropertycachecreator_p.h + qml/qqmlpropertycachemethodarguments_p.h + qml/qqmlpropertycachevector_p.h + qml/qqmlpropertydata_p.h + qml/qqmlpropertyindex_p.h + qml/qqmlpropertyresolver.cpp qml/qqmlpropertyresolver_p.h + qml/qqmlpropertyvalidator.cpp qml/qqmlpropertyvalidator_p.h + qml/qqmlpropertyvalueinterceptor.cpp qml/qqmlpropertyvalueinterceptor_p.h + qml/qqmlpropertyvaluesource.cpp qml/qqmlpropertyvaluesource.h + qml/qqmlproxymetaobject.cpp qml/qqmlproxymetaobject_p.h + qml/qqmlscriptblob.cpp qml/qqmlscriptblob_p.h + qml/qqmlscriptdata.cpp qml/qqmlscriptdata_p.h + qml/qqmlscriptstring.cpp qml/qqmlscriptstring.h qml/qqmlscriptstring_p.h + qml/qqmlsourcecoordinate_p.h + qml/qqmlstaticmetaobject.cpp qml/qqmlstaticmetaobject_p.h + qml/qqmlstringconverters.cpp qml/qqmlstringconverters_p.h + qml/qqmltype.cpp qml/qqmltype_p.h + qml/qqmltype_p_p.h + qml/qqmltypecompiler.cpp qml/qqmltypecompiler_p.h + qml/qqmltypedata.cpp qml/qqmltypedata_p.h + qml/qqmltypeloader.cpp qml/qqmltypeloader_p.h + qml/qqmltypeloaderqmldircontent.cpp qml/qqmltypeloaderqmldircontent_p.h + qml/qqmltypeloaderthread.cpp qml/qqmltypeloaderthread_p.h + qml/qqmltypemodule.cpp qml/qqmltypemodule_p.h + qml/qqmltypemodule_p_p.h + qml/qqmltypemoduleversion.cpp qml/qqmltypemoduleversion_p.h + qml/qqmltypenamecache.cpp qml/qqmltypenamecache_p.h + qml/qqmltypenotavailable.cpp qml/qqmltypenotavailable_p.h + qml/qqmltypewrapper.cpp qml/qqmltypewrapper_p.h + qml/qqmlvaluetype.cpp qml/qqmlvaluetype_p.h + qml/qqmlvaluetypeproxybinding.cpp qml/qqmlvaluetypeproxybinding_p.h + qml/qqmlvaluetypewrapper.cpp + qml/qqmlvme.cpp qml/qqmlvme_p.h + qml/qqmlvmemetaobject.cpp qml/qqmlvmemetaobject_p.h + qml/v8/qqmlbuiltinfunctions.cpp qml/v8/qqmlbuiltinfunctions_p.h + qml/v8/qv4domerrors.cpp qml/v8/qv4domerrors_p.h + qml/v8/qv4sqlerrors.cpp qml/v8/qv4sqlerrors_p.h + qmldirparser/qqmldirparser.cpp qmldirparser/qqmldirparser_p.h + qtqmlcompilerglobal.h qtqmlcompilerglobal_p.h + qtqmlglobal.h qtqmlglobal_p.h + types/qqmlbind.cpp types/qqmlbind_p.h + types/qqmlconnections.cpp types/qqmlconnections_p.h + util/qqmlpropertymap.cpp util/qqmlpropertymap.h + DEFINES + BUILDING_QT__ + ENABLE_ASSEMBLER_WX_EXCLUSIVE=1 + ENABLE_DFG_JIT=0 + ENABLE_DFG_JIT_UTILITY_METHODS=1 + ENABLE_JIT_CONSTANT_BLINDING=0 + ENABLE_LLINT=0 + JS_EXPORT_PRIVATE="" + QT_NO_FOREACH + QT_NO_INTEGER_EVENT_COORDINATES + QT_NO_URL_CAST_FROM_STRING + WTFInvokeCrashHook=qmlWTFInvokeCrashHook + WTFReportAssertionFailure=qmlWTFReportAssertionFailure + WTFReportAssertionFailureWithMessage=qmlWTFReportAssertionFailureWithMessage + WTFReportBacktrace=qmlWTFReportBacktrace + WTF_EXPORT_PRIVATE="" + INCLUDE_DIRECTORIES + ${CMAKE_CURRENT_BINARY_DIR}/compiler + ${CMAKE_CURRENT_BINARY_DIR}/jsruntime + ${CMAKE_CURRENT_BINARY_DIR}/memory + ${CMAKE_CURRENT_BINARY_DIR}/qmldirparser + ../3rdparty/masm + ../3rdparty/masm/assembler + ../3rdparty/masm/disassembler + ../3rdparty/masm/disassembler/udis86 + ../3rdparty/masm/jit + ../3rdparty/masm/runtime + ../3rdparty/masm/stubs + ../3rdparty/masm/stubs/runtime + ../3rdparty/masm/stubs/wtf + ../3rdparty/masm/wtf + .generated + compiler + debugger + jsruntime + memory + qmldirparser + LIBRARIES + Qt::CorePrivate + PUBLIC_LIBRARIES + Qt::Core + PRIVATE_MODULE_INTERFACE + Qt::CorePrivate +) + +# QLALR Grammars: +qt_process_qlalr( + Qml + parser/qqmljs.g + "" +) + +#### Keys ignored in scope 1:.:.:qml.pro:<TRUE>: +# QMLTYPES_FILENAME = "plugins.qmltypes" +# QMLTYPES_INSTALL_DIR = "$$[QT_INSTALL_QML]/QtQml" +# QML_IMPORT_NAME = "QtQml" +# QML_IMPORT_VERSION = "$$QT_VERSION" + +## Scopes: +##################################################################### + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_network + SOURCES + qml/qqmltypeloadernetworkreplyproxy.cpp qml/qqmltypeloadernetworkreplyproxy_p.h + PUBLIC_LIBRARIES + Qt::Network +) + +qt_extend_target(Qml CONDITION MSVC AND (TEST_architecture_arch STREQUAL "i386") + LINK_OPTIONS + "/BASE:0x66000000" +) + +qt_extend_target(Qml CONDITION MSVC + DEFINES + _CRT_SECURE_NO_WARNINGS +) + +qt_extend_target(Qml CONDITION WIN32 AND NOT WINRT + SOURCES + ../3rdparty/masm/wtf/OSAllocatorWin.cpp + PUBLIC_LIBRARIES + shell32 +) + +#### Keys ignored in scope 6:.:.:qml.pro:solaris-cc_x_: +# QMAKE_CXXFLAGS_RELEASE = "--O2" + +qt_extend_target(Qml CONDITION GCC AND (TEST_architecture_arch STREQUAL "mips") + COMPILE_OPTIONS + -fno-reorder-blocks +) + +qt_extend_target(Qml CONDITION EXISTS "qqml_enable_gcov" + LIBRARIES + gcov + COMPILE_OPTIONS + -fno-elide-constructors + -fprofile-arcs + -ftest-coverage +) + +qt_extend_target(Qml CONDITION release AND MSVC AND (QT_CL_MAJOR_VERSION EQUAL 19) AND (QT_CL_MINOR_VERSION EQUAL 00) AND (QT_CL_PATCH_VERSION GREATER 24212) + COMPILE_OPTIONS + -d2SSAOptimizer- +) + +#### Keys ignored in scope 10:.:.:qml.pro:ICC: +# WERROR = "-ww2415" + +#### Keys ignored in scope 11:.:.:qml.pro:(QT_CLANG_MAJOR_VERSION GREATER 3) OR (QT_CLANG_MINOR_VERSION GREATER 3) OR (QT_APPLE_CLANG_MAJOR_VERSION GREATER 5) OR ( (QT_APPLE_CLANG_MAJOR_VERSION EQUAL 5) AND (QT_APPLE_CLANG_MINOR_VERSION GREATER 0) ): +# WERROR = "-Wno-error=unused-const-variable" + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_jit + SOURCES + jit/qv4assemblercommon.cpp jit/qv4assemblercommon_p.h + jit/qv4baselineassembler.cpp jit/qv4baselineassembler_p.h + jit/qv4baselinejit.cpp jit/qv4baselinejit_p.h + INCLUDE_DIRECTORIES + ${CMAKE_CURRENT_BINARY_DIR}/jit + jit +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_animation + SOURCES + animations/qabstractanimationjob.cpp animations/qabstractanimationjob_p.h + animations/qanimationgroupjob.cpp animations/qanimationgroupjob_p.h + animations/qanimationjobutil_p.h + animations/qcontinuinganimationgroupjob.cpp animations/qcontinuinganimationgroupjob_p.h + animations/qparallelanimationgroupjob.cpp animations/qparallelanimationgroupjob_p.h + animations/qpauseanimationjob.cpp animations/qpauseanimationjob_p.h + animations/qsequentialanimationgroupjob.cpp animations/qsequentialanimationgroupjob_p.h + types/qqmltimer.cpp types/qqmltimer_p.h + INCLUDE_DIRECTORIES + animations +) + +#### Keys ignored in scope 17:.:common:common/common.pri:NOT build_pass: +# compile_hash_contents = "// Generated file, DO NOT EDIT" "$${LITERAL_HASH}define QML_COMPILE_HASH "$$QML_COMPILE_HASH"" "$${LITERAL_HASH}define QML_COMPILE_HASH_LENGTH $$str_size($$QML_COMPILE_HASH)" +# tag = <EMPTY> +# tagFile = "$$PWD/../../.tag" + +#### Keys ignored in scope 18:.:common:common/common.pri:EXISTS _ss_tagFile: +# QMAKE_INTERNAL_INCLUDED_FILES = "$$tagFile" +# tag = "$$cat($$tagFile, singleline)" + +#### Keys ignored in scope 19:.:common:common/common.pri:NOT tag___equals____ss_{LITERAL_DOLLAR}Format AND %H_ss_{LITERAL_DOLLAR}: +# QML_COMPILE_HASH = "$$tag" + +#### Keys ignored in scope 21:.:common:common/common.pri:EXISTS _ss_PWD/../../.git: +# QML_COMPILE_HASH = "$$commit" +# commit = "$$system(git rev-parse HEAD)" + +qt_extend_target(Qml CONDITION GCC AND QT_COMPILER_VERSION_MAJOR STREQUAL 5 + COMPILE_OPTIONS + -fno-strict-aliasing +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_debug + SOURCES + debugger/qqmlabstractprofileradapter.cpp debugger/qqmlabstractprofileradapter_p.h + debugger/qqmlconfigurabledebugservice_p.h + debugger/qqmldebug.cpp + debugger/qqmldebugconnector.cpp + debugger/qqmldebugpluginmanager_p.h + debugger/qqmldebugserver_p.h + debugger/qqmldebugserverconnection_p.h + debugger/qqmldebugservice.cpp debugger/qqmldebugservice_p.h + debugger/qqmldebugservicefactory_p.h + debugger/qqmldebugserviceinterfaces.cpp + debugger/qqmlprofiler.cpp + debugger/qqmlprofilerdefinitions_p.h + jsruntime/qv4profiling.cpp +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_sequence_object + SOURCES + jsruntime/qv4sequenceobject.cpp jsruntime/qv4sequenceobject_p.h +) + +qt_extend_target(Qml CONDITION UNIX + SOURCES + jsruntime/qv4compilationunitmapper_unix.cpp + jsruntime/qv4functiontable_unix.cpp +) + +qt_extend_target(Qml CONDITION WIN32 + SOURCES + jsruntime/qv4compilationunitmapper_win.cpp + DEFINES + NOMINMAX +) + +qt_extend_target(Qml CONDITION (TEST_architecture_arch STREQUAL "x86_64") AND WIN32 AND NOT WINRT + SOURCES + jsruntime/qv4functiontable_win64.cpp +) + +qt_extend_target(Qml CONDITION WIN32 AND (WINRT OR NOT (TEST_architecture_arch STREQUAL "x86_64")) + SOURCES + jsruntime/qv4functiontable_noop.cpp +) + +qt_extend_target(Qml CONDITION valgrind + DEFINES + V4_USE_VALGRIND +) + +qt_extend_target(Qml CONDITION heaptrack + DEFINES + V4_USE_HEAPTRACK +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_xml_http_request + SOURCES + qml/qqmlxmlhttprequest.cpp qml/qqmlxmlhttprequest_p.h +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_locale + SOURCES + qml/qqmllocale.cpp qml/qqmllocale_p.h +) + +qt_extend_target(Qml CONDITION ANDROID + DEFINES + LIBS_SUFFIX="_${CMAKE_SYSTEM_PROCESSOR}.so" +) + +qt_extend_target(Qml CONDITION hpux-_x_ OR solaris-_x_ OR (QT_FEATURE_clock_gettime AND linux-_x_) + LIBRARIES + rt +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_itemmodel + SOURCES + types/qqmlmodelindexvaluetype.cpp types/qqmlmodelindexvaluetype_p.h +) + +qt_extend_target(Qml CONDITION disassembler AND ((TEST_architecture_arch STREQUAL "i386") OR (TEST_architecture_arch STREQUAL "x86_64")) + DEFINES + WTF_USE_UDIS86=1 +) + +qt_extend_target(Qml CONDITION (TEST_architecture_arch STREQUAL "arm") AND disassembler + DEFINES + WTF_USE_ARMV7_DISASSEMBLER=1 +) + +qt_extend_target(Qml CONDITION (TEST_architecture_arch STREQUAL "arm64") AND disassembler + DEFINES + WTF_USE_ARM64_DISASSEMBLER=1 +) + +qt_extend_target(Qml CONDITION (TEST_architecture_arch STREQUAL "mips") AND disassembler + DEFINES + WTF_USE_MIPS32_DISASSEMBLER=1 +) + +qt_extend_target(Qml CONDITION NOT disassembler + DEFINES + WTF_USE_UDIS86=0 +) + +qt_extend_target(Qml CONDITION CMAKE_BUILD_TYPE STREQUAL Release + DEFINES + NDEBUG +) + +qt_extend_target(Qml CONDITION GCC AND QT_COMPILER_VERSION_MAJOR STRGREATER 6 AND NOT CLANG AND NOT ICC + COMPILE_OPTIONS + -Wno-expansion-to-defined +) + +#### Keys ignored in scope 65:.:../3rdparty/masm:../3rdparty/masm/masm-defs.pri:(QT_COMPILER_VERSION_MAJOR STRGREATER 6): +# QMAKE_CXXFLAGS_WARN_ON = "-Wno-expansion-to-defined" + +qt_extend_target(Qml CONDITION WINRT + SOURCES + ../3rdparty/masm/wtf/OSAllocatorWinRT.cpp +) + +qt_extend_target(Qml CONDITION INTEGRITY + SOURCES + ../3rdparty/masm/wtf/OSAllocatorIntegrity.cpp +) + +qt_extend_target(Qml CONDITION UNIX AND NOT INTEGRITY AND NOT WINRT + SOURCES + ../3rdparty/masm/wtf/OSAllocatorPosix.cpp +) + +qt_extend_target(Qml CONDITION DEFINES___contains___WTF_USE_UDIS86=1 + SOURCES + ../3rdparty/masm/disassembler/udis86/udis86.c + ../3rdparty/masm/disassembler/udis86/udis86_decode.c + ../3rdparty/masm/disassembler/udis86/udis86_input.c + ../3rdparty/masm/disassembler/udis86/udis86_itab_holder.c + ../3rdparty/masm/disassembler/udis86/udis86_syn.c + ../3rdparty/masm/disassembler/udis86/udis86_syn-att.c + ../3rdparty/masm/disassembler/udis86/udis86_syn-intel.c +) + +#### Keys ignored in scope 73:.:../3rdparty/masm:../3rdparty/masm/masm.pri:DEFINES___contains___WTF_USE_UDIS86=1: +# ITAB = "$$PWD/disassembler/udis86/optable.xml" +# QMAKE_EXTRA_COMPILERS = "udis86" +# QMAKE_EXTRA_TARGETS = "udis86_tab_cfile" +# udis86.CONFIG = "no_link" +# udis86.commands = "python" "$$PWD/disassembler/udis86/itab.py" "${QMAKE_FILE_IN}" +# udis86.input = "ITAB" +# udis86.output = "udis86_itab.h" +# udis86_tab_cfile.depends = "udis86_itab.h" +# udis86_tab_cfile.target = "$$OUT_PWD/udis86_itab.c" + +#### Keys ignored in scope 75:.:../3rdparty/masm:../3rdparty/masm/masm.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): +# GENERATEDDIR = "$$GENERATEDDIR/debug" + +#### Keys ignored in scope 76:.:../3rdparty/masm:../3rdparty/masm/masm.pri:else: +# GENERATEDDIR = "$$GENERATEDDIR/release" + +qt_extend_target(Qml CONDITION (NOT c++11 AND NOT ICC) AND (CLANG) + COMPILE_OPTIONS + -Wno-c++0x-extensions + -Wno-c++11-extensions +) + +qt_extend_target(Qml CONDITION (((NOT c++11 AND NOT ICC) AND (NOT (CLANG))) AND (GCC)) AND ((QT_COMPILER_VERSION_MAJOR STRGREATER 4) OR (QT_COMPILER_VERSION_MINOR STRGREATER 5)) + COMPILE_OPTIONS + -Wno-c++0x-compat +) + + +qt_create_tracepoints(Qml qtqml.tracepoints) +qt_add_docs(Qml + doc/qtqml.qdocconf +) + + +set_target_properties(Qml PROPERTIES + QT_QML_MODULE_INSTALL_QMLTYPES TRUE + QT_QML_MODULE_VERSION ${CMAKE_PROJECT_VERSION} + QT_QML_MODULE_URI QtQml + QT_QML_MODULE_INSTALL_DIR "${INSTALL_QMLDIR}/QtQml" +) + +qt6_qml_type_registration(Qml) diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt new file mode 100644 index 0000000000..3240e48092 --- /dev/null +++ b/src/qml/CMakeLists.txt @@ -0,0 +1,628 @@ +# Generated from qml.pro. + +##################################################################### +## Qml Module: +##################################################################### + +qt_add_module(Qml + GENERATE_METATYPES + PLUGIN_TYPES qmltooling + SOURCES + # ../3rdparty/masm/assembler/*.h special case remove + ../3rdparty/masm/assembler/ARMv7Assembler.cpp + ../3rdparty/masm/assembler/LinkBuffer.cpp + ../3rdparty/masm/disassembler/ARM64/A64DOpcode.cpp ../3rdparty/masm/disassembler/ARM64/A64DOpcode.h + ../3rdparty/masm/disassembler/ARM64Disassembler.cpp + ../3rdparty/masm/disassembler/ARMv7/ARMv7DOpcode.cpp ../3rdparty/masm/disassembler/ARMv7/ARMv7DOpcode.h + ../3rdparty/masm/disassembler/ARMv7Disassembler.cpp + ../3rdparty/masm/disassembler/Disassembler.cpp + ../3rdparty/masm/disassembler/Mips32Disassembler.cpp + ../3rdparty/masm/disassembler/UDis86Disassembler.cpp + ../3rdparty/masm/disassembler/mips32/Mips32Opcode.cpp ../3rdparty/masm/disassembler/mips32/Mips32Opcode.h + ../3rdparty/masm/stubs/Options.cpp + ../3rdparty/masm/stubs/WTFStubs.cpp ../3rdparty/masm/stubs/WTFStubs.h + ../3rdparty/masm/stubs/wtf/FastAllocBase.h + ../3rdparty/masm/stubs/wtf/FastMalloc.h + ../3rdparty/masm/stubs/wtf/Noncopyable.h + ../3rdparty/masm/stubs/wtf/OwnPtr.h + ../3rdparty/masm/stubs/wtf/PassOwnPtr.h + ../3rdparty/masm/stubs/wtf/PassRefPtr.h + ../3rdparty/masm/stubs/wtf/RefCounted.h + ../3rdparty/masm/stubs/wtf/RefPtr.h + ../3rdparty/masm/stubs/wtf/TypeTraits.h + ../3rdparty/masm/stubs/wtf/UnusedParam.h + ../3rdparty/masm/stubs/wtf/Vector.h + ../3rdparty/masm/stubs/yarr/YarrUnicodeProperties.cpp + # ../3rdparty/masm/wtf/*.h special case remove + ../3rdparty/masm/wtf/FilePrintStream.cpp ../3rdparty/masm/wtf/FilePrintStream.h + ../3rdparty/masm/wtf/OSAllocator.h + ../3rdparty/masm/wtf/PageAllocation.h + ../3rdparty/masm/wtf/PageAllocationAligned.cpp ../3rdparty/masm/wtf/PageAllocationAligned.h + ../3rdparty/masm/wtf/PageBlock.cpp ../3rdparty/masm/wtf/PageBlock.h + ../3rdparty/masm/wtf/PageReservation.h + ../3rdparty/masm/wtf/PrintStream.cpp ../3rdparty/masm/wtf/PrintStream.h + ../3rdparty/masm/wtf/RawPointer.h + ../3rdparty/masm/yarr/Yarr.h + ../3rdparty/masm/yarr/YarrCanonicalizeUCS2.cpp ../3rdparty/masm/yarr/YarrCanonicalizeUCS2.h + ../3rdparty/masm/yarr/YarrCanonicalizeUnicode.cpp + ../3rdparty/masm/yarr/YarrInterpreter.cpp ../3rdparty/masm/yarr/YarrInterpreter.h + ../3rdparty/masm/yarr/YarrJIT.cpp ../3rdparty/masm/yarr/YarrJIT.h + ../3rdparty/masm/yarr/YarrParser.h + ../3rdparty/masm/yarr/YarrPattern.cpp ../3rdparty/masm/yarr/YarrPattern.h + ../3rdparty/masm/yarr/YarrSyntaxChecker.cpp ../3rdparty/masm/yarr/YarrSyntaxChecker.h + ../3rdparty/masm/yarr/YarrUnicodeProperties.h + common/qqmlapiversion_p.h + common/qqmljsdiagnosticmessage_p.h + common/qqmljsfixedpoolarray_p.h + common/qqmljsmemorypool_p.h + common/qqmljssourcelocation_p.h + common/qv4alloca_p.h + common/qv4calldata_p.h + common/qv4compileddata_p.h + common/qv4staticvalue_p.h + common/qv4stringtoarrayindex_p.h + compiler/qqmlirbuilder.cpp compiler/qqmlirbuilder_p.h + compiler/qv4bytecodegenerator.cpp compiler/qv4bytecodegenerator_p.h + compiler/qv4bytecodehandler.cpp compiler/qv4bytecodehandler_p.h + compiler/qv4codegen.cpp compiler/qv4codegen_p.h + compiler/qv4compiler.cpp compiler/qv4compiler_p.h + compiler/qv4compilercontext.cpp compiler/qv4compilercontext_p.h + compiler/qv4compilercontrolflow_p.h + compiler/qv4compilerglobal_p.h + compiler/qv4compilerscanfunctions.cpp compiler/qv4compilerscanfunctions_p.h + compiler/qv4instr_moth.cpp compiler/qv4instr_moth_p.h + compiler/qv4util_p.h + debugger/qqmldebug.h + debugger/qqmldebugconnector_p.h + debugger/qqmldebugserviceinterfaces_p.h + debugger/qqmldebugstatesdelegate_p.h + debugger/qqmlprofiler_p.h + inlinecomponentutils_p.h + jsapi/qjsengine.cpp jsapi/qjsengine.h jsapi/qjsengine_p.h + jsapi/qjsvalue.cpp jsapi/qjsvalue.h jsapi/qjsvalue_p.h + jsapi/qjsvalueiterator.cpp jsapi/qjsvalueiterator.h jsapi/qjsvalueiterator_p.h + jsruntime/qv4argumentsobject.cpp jsruntime/qv4argumentsobject_p.h + jsruntime/qv4arraybuffer.cpp jsruntime/qv4arraybuffer_p.h + jsruntime/qv4arraydata.cpp jsruntime/qv4arraydata_p.h + jsruntime/qv4arrayiterator.cpp jsruntime/qv4arrayiterator_p.h + jsruntime/qv4arrayobject.cpp jsruntime/qv4arrayobject_p.h + jsruntime/qv4atomics.cpp jsruntime/qv4atomics_p.h + jsruntime/qv4booleanobject.cpp jsruntime/qv4booleanobject_p.h + jsruntime/qv4compilationunitmapper.cpp jsruntime/qv4compilationunitmapper_p.h + jsruntime/qv4context.cpp jsruntime/qv4context_p.h + jsruntime/qv4dataview.cpp jsruntime/qv4dataview_p.h + jsruntime/qv4dateobject.cpp jsruntime/qv4dateobject_p.h + jsruntime/qv4debugging_p.h + jsruntime/qv4engine.cpp jsruntime/qv4engine_p.h + jsruntime/qv4enginebase_p.h + jsruntime/qv4errorobject.cpp jsruntime/qv4errorobject_p.h + jsruntime/qv4estable.cpp jsruntime/qv4estable_p.h + jsruntime/qv4executableallocator.cpp jsruntime/qv4executableallocator_p.h + jsruntime/qv4executablecompilationunit.cpp jsruntime/qv4executablecompilationunit_p.h + jsruntime/qv4function.cpp jsruntime/qv4function_p.h + jsruntime/qv4functionobject.cpp jsruntime/qv4functionobject_p.h + jsruntime/qv4functiontable_p.h + jsruntime/qv4generatorobject.cpp jsruntime/qv4generatorobject_p.h + jsruntime/qv4global_p.h + jsruntime/qv4globalobject.cpp jsruntime/qv4globalobject_p.h + jsruntime/qv4identifier.cpp jsruntime/qv4identifier_p.h + jsruntime/qv4identifiertable.cpp jsruntime/qv4identifiertable_p.h + jsruntime/qv4include.cpp jsruntime/qv4include_p.h + jsruntime/qv4internalclass.cpp jsruntime/qv4internalclass_p.h + jsruntime/qv4iterator.cpp jsruntime/qv4iterator_p.h + jsruntime/qv4jscall_p.h + jsruntime/qv4jsonobject.cpp jsruntime/qv4jsonobject_p.h + jsruntime/qv4lookup.cpp jsruntime/qv4lookup_p.h + jsruntime/qv4managed.cpp jsruntime/qv4managed_p.h + jsruntime/qv4mapiterator.cpp jsruntime/qv4mapiterator_p.h + jsruntime/qv4mapobject.cpp jsruntime/qv4mapobject_p.h + jsruntime/qv4math_p.h + jsruntime/qv4mathobject.cpp jsruntime/qv4mathobject_p.h + jsruntime/qv4memberdata.cpp jsruntime/qv4memberdata_p.h + jsruntime/qv4module.cpp jsruntime/qv4module_p.h + jsruntime/qv4numberobject.cpp jsruntime/qv4numberobject_p.h + jsruntime/qv4object.cpp jsruntime/qv4object_p.h + jsruntime/qv4objectiterator.cpp jsruntime/qv4objectiterator_p.h + jsruntime/qv4objectproto.cpp jsruntime/qv4objectproto_p.h + jsruntime/qv4persistent.cpp jsruntime/qv4persistent_p.h + jsruntime/qv4profiling_p.h + jsruntime/qv4promiseobject.cpp jsruntime/qv4promiseobject_p.h + jsruntime/qv4property_p.h + jsruntime/qv4propertykey.cpp jsruntime/qv4propertykey_p.h + jsruntime/qv4proxy.cpp jsruntime/qv4proxy_p.h + jsruntime/qv4qmlcontext.cpp jsruntime/qv4qmlcontext_p.h + jsruntime/qv4qobjectwrapper.cpp jsruntime/qv4qobjectwrapper_p.h + jsruntime/qv4reflect.cpp jsruntime/qv4reflect_p.h + jsruntime/qv4regexp.cpp jsruntime/qv4regexp_p.h + jsruntime/qv4regexpobject.cpp jsruntime/qv4regexpobject_p.h + jsruntime/qv4runtime.cpp jsruntime/qv4runtime_p.h + jsruntime/qv4runtimeapi_p.h + jsruntime/qv4runtimecodegen.cpp jsruntime/qv4runtimecodegen_p.h + jsruntime/qv4scopedvalue_p.h + jsruntime/qv4script.cpp jsruntime/qv4script_p.h + jsruntime/qv4setiterator.cpp jsruntime/qv4setiterator_p.h + jsruntime/qv4setobject.cpp jsruntime/qv4setobject_p.h + jsruntime/qv4sparsearray.cpp jsruntime/qv4sparsearray_p.h + jsruntime/qv4stackframe.cpp jsruntime/qv4stackframe_p.h + jsruntime/qv4string.cpp jsruntime/qv4string_p.h + jsruntime/qv4stringiterator.cpp jsruntime/qv4stringiterator_p.h + jsruntime/qv4stringobject.cpp jsruntime/qv4stringobject_p.h + jsruntime/qv4symbol.cpp jsruntime/qv4symbol_p.h + jsruntime/qv4typedarray.cpp jsruntime/qv4typedarray_p.h + jsruntime/qv4value.cpp jsruntime/qv4value_p.h + jsruntime/qv4variantobject.cpp jsruntime/qv4variantobject_p.h + jsruntime/qv4vme_moth.cpp jsruntime/qv4vme_moth_p.h + jsruntime/qv4vtable_p.h + memory/qv4heap_p.h + memory/qv4mm.cpp memory/qv4mm_p.h + memory/qv4mmdefs_p.h + memory/qv4writebarrier_p.h + parser/qqmljsast.cpp parser/qqmljsast_p.h + parser/qqmljsastfwd_p.h + parser/qqmljsastvisitor.cpp parser/qqmljsastvisitor_p.h + parser/qqmljsengine_p.cpp parser/qqmljsengine_p.h + parser/qqmljsglobal_p.h + parser/qqmljskeywords_p.h + parser/qqmljslexer.cpp parser/qqmljslexer_p.h + qml/ftw/qbitfield_p.h + qml/ftw/qfieldlist_p.h + qml/ftw/qfinitestack_p.h + qml/ftw/qflagpointer_p.h + qml/ftw/qhashedstring.cpp qml/ftw/qhashedstring_p.h + qml/ftw/qintrusivelist.cpp qml/ftw/qintrusivelist_p.h + qml/ftw/qlazilyallocated_p.h + qml/ftw/qlinkedstringhash_p.h + qml/ftw/qpodvector_p.h + qml/ftw/qprimefornumbits_p.h + qml/ftw/qqmlnullablevalue_p.h + qml/ftw/qqmlrefcount_p.h + qml/ftw/qqmlthread.cpp qml/ftw/qqmlthread_p.h + qml/ftw/qrecursionwatcher_p.h + qml/ftw/qrecyclepool_p.h + qml/ftw/qstringhash_p.h + qml/qqml.cpp qml/qqml.h + qml/qqmlabstractbinding.cpp qml/qqmlabstractbinding_p.h + qml/qqmlabstracturlinterceptor.cpp qml/qqmlabstracturlinterceptor.h + qml/qqmlapplicationengine.cpp qml/qqmlapplicationengine.h qml/qqmlapplicationengine_p.h + qml/qqmlbinding.cpp qml/qqmlbinding_p.h + qml/qqmlboundsignal.cpp qml/qqmlboundsignal_p.h + qml/qqmlboundsignalexpressionpointer_p.h + qml/qqmlcleanup.cpp qml/qqmlcleanup_p.h + qml/qqmlcomponent.cpp qml/qqmlcomponent.h qml/qqmlcomponent_p.h + qml/qqmlcomponentattached_p.h + qml/qqmlcontext.cpp qml/qqmlcontext.h qml/qqmlcontext_p.h + qml/qqmlcustomparser.cpp qml/qqmlcustomparser_p.h + qml/qqmldata_p.h + qml/qqmldatablob.cpp qml/qqmldatablob_p.h + qml/qqmldelayedcallqueue.cpp qml/qqmldelayedcallqueue_p.h + qml/qqmldirdata.cpp qml/qqmldirdata_p.h + qml/qqmlengine.cpp qml/qqmlengine.h qml/qqmlengine_p.h + qml/qqmlenumdata_p.h + qml/qqmlenumvalue_p.h + qml/qqmlerror.cpp qml/qqmlerror.h + qml/qqmlexpression.cpp qml/qqmlexpression.h qml/qqmlexpression_p.h + qml/qqmlextensioninterface.h + qml/qqmlextensionplugin.cpp qml/qqmlextensionplugin.h qml/qqmlextensionplugin_p.h + qml/qqmlfile.cpp qml/qqmlfile.h + qml/qqmlfileselector.cpp qml/qqmlfileselector.h qml/qqmlfileselector_p.h + qml/qqmlglobal.cpp qml/qqmlglobal_p.h + qml/qqmlguard_p.h + qml/qqmlimport.cpp qml/qqmlimport_p.h + qml/qqmlincubator.cpp qml/qqmlincubator.h qml/qqmlincubator_p.h + qml/qqmlinfo.cpp qml/qqmlinfo.h + qml/qqmlirloader.cpp qml/qqmlirloader_p.h + qml/qqmljavascriptexpression.cpp qml/qqmljavascriptexpression_p.h + qml/qqmllist.cpp qml/qqmllist.h qml/qqmllist_p.h + qml/qqmllistwrapper.cpp qml/qqmllistwrapper_p.h + qml/qqmlloggingcategory.cpp qml/qqmlloggingcategory_p.h + qml/qqmlmetaobject.cpp qml/qqmlmetaobject_p.h + qml/qqmlmetatype.cpp qml/qqmlmetatype_p.h + qml/qqmlmetatypedata.cpp qml/qqmlmetatypedata_p.h + qml/qqmlmoduleregistration.cpp qml/qqmlmoduleregistration.h + qml/qqmlnetworkaccessmanagerfactory.cpp qml/qqmlnetworkaccessmanagerfactory.h + qml/qqmlnotifier.cpp qml/qqmlnotifier_p.h + qml/qqmlobjectcreator.cpp qml/qqmlobjectcreator_p.h + qml/qqmlobjectorgadget.cpp qml/qqmlobjectorgadget_p.h + qml/qqmlopenmetaobject.cpp qml/qqmlopenmetaobject_p.h + qml/qqmlparserstatus.cpp qml/qqmlparserstatus.h + qml/qqmlplatform.cpp qml/qqmlplatform_p.h + qml/qqmlprivate.h + qml/qqmlproperty.cpp qml/qqmlproperty.h qml/qqmlproperty_p.h + qml/qqmlpropertycache.cpp qml/qqmlpropertycache_p.h + qml/qqmlpropertycachecreator.cpp qml/qqmlpropertycachecreator_p.h + qml/qqmlpropertycachemethodarguments_p.h + qml/qqmlpropertycachevector_p.h + qml/qqmlpropertydata_p.h + qml/qqmlpropertyindex_p.h + qml/qqmlpropertyresolver.cpp qml/qqmlpropertyresolver_p.h + qml/qqmlpropertyvalidator.cpp qml/qqmlpropertyvalidator_p.h + qml/qqmlpropertyvalueinterceptor.cpp qml/qqmlpropertyvalueinterceptor_p.h + qml/qqmlpropertyvaluesource.cpp qml/qqmlpropertyvaluesource.h + qml/qqmlproxymetaobject.cpp qml/qqmlproxymetaobject_p.h + qml/qqmlscriptblob.cpp qml/qqmlscriptblob_p.h + qml/qqmlscriptdata.cpp qml/qqmlscriptdata_p.h + qml/qqmlscriptstring.cpp qml/qqmlscriptstring.h qml/qqmlscriptstring_p.h + qml/qqmlsourcecoordinate_p.h + qml/qqmlstaticmetaobject.cpp qml/qqmlstaticmetaobject_p.h + qml/qqmlstringconverters.cpp qml/qqmlstringconverters_p.h + qml/qqmltype.cpp qml/qqmltype_p.h + qml/qqmltype_p_p.h + qml/qqmltypecompiler.cpp qml/qqmltypecompiler_p.h + qml/qqmltypedata.cpp qml/qqmltypedata_p.h + qml/qqmltypeloader.cpp qml/qqmltypeloader_p.h + qml/qqmltypeloaderqmldircontent.cpp qml/qqmltypeloaderqmldircontent_p.h + qml/qqmltypeloaderthread.cpp qml/qqmltypeloaderthread_p.h + qml/qqmltypemodule.cpp qml/qqmltypemodule_p.h + qml/qqmltypemodule_p_p.h + qml/qqmltypemoduleversion.cpp qml/qqmltypemoduleversion_p.h + qml/qqmltypenamecache.cpp qml/qqmltypenamecache_p.h + qml/qqmltypenotavailable.cpp qml/qqmltypenotavailable_p.h + qml/qqmltypewrapper.cpp qml/qqmltypewrapper_p.h + qml/qqmlvaluetype.cpp qml/qqmlvaluetype_p.h + qml/qqmlvaluetypeproxybinding.cpp qml/qqmlvaluetypeproxybinding_p.h + qml/qqmlvaluetypewrapper.cpp + qml/qqmlvme.cpp qml/qqmlvme_p.h + qml/qqmlvmemetaobject.cpp qml/qqmlvmemetaobject_p.h + qml/v8/qqmlbuiltinfunctions.cpp qml/v8/qqmlbuiltinfunctions_p.h + qml/v8/qv4domerrors.cpp qml/v8/qv4domerrors_p.h + qml/v8/qv4sqlerrors.cpp qml/v8/qv4sqlerrors_p.h + qmldirparser/qqmldirparser.cpp qmldirparser/qqmldirparser_p.h + qtqmlcompilerglobal.h qtqmlcompilerglobal_p.h + qtqmlglobal.h qtqmlglobal_p.h + types/qqmlbind.cpp types/qqmlbind_p.h + types/qqmlconnections.cpp types/qqmlconnections_p.h + util/qqmlpropertymap.cpp util/qqmlpropertymap.h + DEFINES + BUILDING_QT__ + ENABLE_ASSEMBLER_WX_EXCLUSIVE=1 + ENABLE_DFG_JIT=0 + ENABLE_DFG_JIT_UTILITY_METHODS=1 + ENABLE_JIT_CONSTANT_BLINDING=0 + ENABLE_LLINT=0 + JS_EXPORT_PRIVATE= # special case + QT_NO_FOREACH + QT_NO_INTEGER_EVENT_COORDINATES + QT_NO_URL_CAST_FROM_STRING + WTFInvokeCrashHook=qmlWTFInvokeCrashHook + WTFReportAssertionFailure=qmlWTFReportAssertionFailure + WTFReportAssertionFailureWithMessage=qmlWTFReportAssertionFailureWithMessage + WTFReportBacktrace=qmlWTFReportBacktrace + WTF_EXPORT_PRIVATE= # special case + INCLUDE_DIRECTORIES + ${CMAKE_CURRENT_BINARY_DIR}/compiler + ${CMAKE_CURRENT_BINARY_DIR}/jsruntime + ${CMAKE_CURRENT_BINARY_DIR}/memory + ${CMAKE_CURRENT_BINARY_DIR}/qmldirparser + ../3rdparty/masm + ../3rdparty/masm/assembler + ../3rdparty/masm/disassembler + ../3rdparty/masm/disassembler/udis86 + ../3rdparty/masm/jit + ../3rdparty/masm/runtime + ../3rdparty/masm/stubs + ../3rdparty/masm/stubs/runtime + ../3rdparty/masm/stubs/wtf + ../3rdparty/masm/wtf + .generated + compiler + debugger + jsruntime + memory + qmldirparser + LIBRARIES + Qt::CorePrivate + PUBLIC_LIBRARIES + Qt::Core + PRIVATE_MODULE_INTERFACE + Qt::CorePrivate +) + +# special case begin remove the block, handled manually +# QLALR Grammars: +#qt_process_qlalr( +# Qml +# parser/qqmljs.g +# "" +#) + +qt_declarative_write_tag_header(Qml) +set(_qt_qlalr_flags "--no-debug" "--qt") +qt_process_qlalr(Qml "${CMAKE_CURRENT_SOURCE_DIR}/parser/qqmljs.g" "${_qt_qlalr_flags}") +qt_declarative_generate_reg_exp_jit_tables(Qml) +# special case end + +#### Keys ignored in scope 1:.:.:qml.pro:<TRUE>: +# QMLTYPES_FILENAME = "plugins.qmltypes" +# QMLTYPES_INSTALL_DIR = "$$[QT_INSTALL_QML]/QtQml" +# QML_IMPORT_NAME = "QtQml" +# QML_IMPORT_VERSION = "$$QT_VERSION" + +## Scopes: +##################################################################### + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_network + SOURCES + qml/qqmltypeloadernetworkreplyproxy.cpp qml/qqmltypeloadernetworkreplyproxy_p.h + PUBLIC_LIBRARIES + Qt::Network +) + +qt_extend_target(Qml CONDITION MSVC AND (TEST_architecture_arch STREQUAL "i386") + LINK_OPTIONS + "/BASE:0x66000000" +) + +qt_extend_target(Qml CONDITION MSVC + DEFINES + _CRT_SECURE_NO_WARNINGS +) + +qt_extend_target(Qml CONDITION WIN32 AND NOT WINRT + SOURCES + ../3rdparty/masm/wtf/OSAllocatorWin.cpp + PUBLIC_LIBRARIES + shell32 +) + +#### Keys ignored in scope 6:.:.:qml.pro:solaris-cc_x_: +# QMAKE_CXXFLAGS_RELEASE = "--O2" + +qt_extend_target(Qml CONDITION GCC AND (TEST_architecture_arch STREQUAL "mips") + COMPILE_OPTIONS + -fno-reorder-blocks +) + +qt_extend_target(Qml CONDITION EXISTS "qqml_enable_gcov" + LIBRARIES + gcov + COMPILE_OPTIONS + -fno-elide-constructors + -fprofile-arcs + -ftest-coverage +) + +qt_extend_target(Qml CONDITION release AND MSVC AND (QT_CL_MAJOR_VERSION EQUAL 19) AND (QT_CL_MINOR_VERSION EQUAL 00) AND (QT_CL_PATCH_VERSION GREATER 24212) + COMPILE_OPTIONS + -d2SSAOptimizer- +) + +#### Keys ignored in scope 10:.:.:qml.pro:ICC: +# WERROR = "-ww2415" + +#### Keys ignored in scope 11:.:.:qml.pro:(QT_CLANG_MAJOR_VERSION GREATER 3) OR (QT_CLANG_MINOR_VERSION GREATER 3) OR (QT_APPLE_CLANG_MAJOR_VERSION GREATER 5) OR ( (QT_APPLE_CLANG_MAJOR_VERSION EQUAL 5) AND (QT_APPLE_CLANG_MINOR_VERSION GREATER 0) ): +# WERROR = "-Wno-error=unused-const-variable" + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_jit + SOURCES + jit/qv4assemblercommon.cpp jit/qv4assemblercommon_p.h + jit/qv4baselineassembler.cpp jit/qv4baselineassembler_p.h + jit/qv4baselinejit.cpp jit/qv4baselinejit_p.h + INCLUDE_DIRECTORIES + ${CMAKE_CURRENT_BINARY_DIR}/jit + jit +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_animation + SOURCES + animations/qabstractanimationjob.cpp animations/qabstractanimationjob_p.h + animations/qanimationgroupjob.cpp animations/qanimationgroupjob_p.h + animations/qanimationjobutil_p.h + animations/qcontinuinganimationgroupjob.cpp animations/qcontinuinganimationgroupjob_p.h + animations/qparallelanimationgroupjob.cpp animations/qparallelanimationgroupjob_p.h + animations/qpauseanimationjob.cpp animations/qpauseanimationjob_p.h + animations/qsequentialanimationgroupjob.cpp animations/qsequentialanimationgroupjob_p.h + types/qqmltimer.cpp types/qqmltimer_p.h + INCLUDE_DIRECTORIES + animations +) + +#### Keys ignored in scope 17:.:common:common/common.pri:NOT build_pass: +# compile_hash_contents = "// Generated file, DO NOT EDIT" "$${LITERAL_HASH}define QML_COMPILE_HASH "$$QML_COMPILE_HASH"" "$${LITERAL_HASH}define QML_COMPILE_HASH_LENGTH $$str_size($$QML_COMPILE_HASH)" +# tag = <EMPTY> +# tagFile = "$$PWD/../../.tag" + +#### Keys ignored in scope 18:.:common:common/common.pri:EXISTS _ss_tagFile: +# QMAKE_INTERNAL_INCLUDED_FILES = "$$tagFile" +# tag = "$$cat($$tagFile, singleline)" + +#### Keys ignored in scope 19:.:common:common/common.pri:NOT tag___equals____ss_{LITERAL_DOLLAR}Format AND %H_ss_{LITERAL_DOLLAR}: +# QML_COMPILE_HASH = "$$tag" + +#### Keys ignored in scope 21:.:common:common/common.pri:EXISTS _ss_PWD/../../.git: +# QML_COMPILE_HASH = "$$commit" +# commit = "$$system(git rev-parse HEAD)" + +qt_extend_target(Qml CONDITION GCC AND QT_COMPILER_VERSION_MAJOR STREQUAL 5 + COMPILE_OPTIONS + -fno-strict-aliasing +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_debug + SOURCES + debugger/qqmlabstractprofileradapter.cpp debugger/qqmlabstractprofileradapter_p.h + debugger/qqmlconfigurabledebugservice_p.h + debugger/qqmldebug.cpp + debugger/qqmldebugconnector.cpp + debugger/qqmldebugpluginmanager_p.h + debugger/qqmldebugserver_p.h + debugger/qqmldebugserverconnection_p.h + debugger/qqmldebugservice.cpp debugger/qqmldebugservice_p.h + debugger/qqmldebugservicefactory_p.h + debugger/qqmldebugserviceinterfaces.cpp + debugger/qqmlprofiler.cpp + debugger/qqmlprofilerdefinitions_p.h + jsruntime/qv4profiling.cpp +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_sequence_object + SOURCES + jsruntime/qv4sequenceobject.cpp jsruntime/qv4sequenceobject_p.h +) + +qt_extend_target(Qml CONDITION UNIX + SOURCES + jsruntime/qv4compilationunitmapper_unix.cpp + jsruntime/qv4functiontable_unix.cpp +) + +qt_extend_target(Qml CONDITION WIN32 + SOURCES + jsruntime/qv4compilationunitmapper_win.cpp + DEFINES + NOMINMAX +) + +qt_extend_target(Qml CONDITION (TEST_architecture_arch STREQUAL "x86_64") AND WIN32 AND NOT WINRT + SOURCES + jsruntime/qv4functiontable_win64.cpp +) + +qt_extend_target(Qml CONDITION WIN32 AND (WINRT OR NOT (TEST_architecture_arch STREQUAL "x86_64")) + SOURCES + jsruntime/qv4functiontable_noop.cpp +) + +qt_extend_target(Qml CONDITION valgrind + DEFINES + V4_USE_VALGRIND +) + +qt_extend_target(Qml CONDITION heaptrack + DEFINES + V4_USE_HEAPTRACK +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_xml_http_request + SOURCES + qml/qqmlxmlhttprequest.cpp qml/qqmlxmlhttprequest_p.h +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_locale + SOURCES + qml/qqmllocale.cpp qml/qqmllocale_p.h +) + +qt_extend_target(Qml CONDITION ANDROID + DEFINES + LIBS_SUFFIX="_${CMAKE_SYSTEM_PROCESSOR}.so" +) + +qt_extend_target(Qml CONDITION hpux-_x_ OR solaris-_x_ OR (QT_FEATURE_clock_gettime AND linux-_x_) + LIBRARIES + rt +) + +qt_extend_target(Qml CONDITION QT_FEATURE_qml_itemmodel + SOURCES + types/qqmlmodelindexvaluetype.cpp types/qqmlmodelindexvaluetype_p.h +) + +qt_extend_target(Qml CONDITION disassembler AND ((TEST_architecture_arch STREQUAL "i386") OR (TEST_architecture_arch STREQUAL "x86_64")) + DEFINES + WTF_USE_UDIS86=1 +) + +qt_extend_target(Qml CONDITION (TEST_architecture_arch STREQUAL "arm") AND disassembler + DEFINES + WTF_USE_ARMV7_DISASSEMBLER=1 +) + +qt_extend_target(Qml CONDITION (TEST_architecture_arch STREQUAL "arm64") AND disassembler + DEFINES + WTF_USE_ARM64_DISASSEMBLER=1 +) + +qt_extend_target(Qml CONDITION (TEST_architecture_arch STREQUAL "mips") AND disassembler + DEFINES + WTF_USE_MIPS32_DISASSEMBLER=1 +) + +qt_extend_target(Qml CONDITION NOT disassembler + DEFINES + WTF_USE_UDIS86=0 +) + +qt_extend_target(Qml CONDITION CMAKE_BUILD_TYPE STREQUAL Release + DEFINES + NDEBUG +) + +qt_extend_target(Qml CONDITION GCC AND QT_COMPILER_VERSION_MAJOR STRGREATER 6 AND NOT CLANG AND NOT ICC + COMPILE_OPTIONS + -Wno-expansion-to-defined +) + +#### Keys ignored in scope 65:.:../3rdparty/masm:../3rdparty/masm/masm-defs.pri:(QT_COMPILER_VERSION_MAJOR STRGREATER 6): +# QMAKE_CXXFLAGS_WARN_ON = "-Wno-expansion-to-defined" + +qt_extend_target(Qml CONDITION WINRT + SOURCES + ../3rdparty/masm/wtf/OSAllocatorWinRT.cpp +) + +qt_extend_target(Qml CONDITION INTEGRITY + SOURCES + ../3rdparty/masm/wtf/OSAllocatorIntegrity.cpp +) + +qt_extend_target(Qml CONDITION UNIX AND NOT INTEGRITY AND NOT WINRT + SOURCES + ../3rdparty/masm/wtf/OSAllocatorPosix.cpp +) + +qt_extend_target(Qml CONDITION DEFINES___contains___WTF_USE_UDIS86=1 + SOURCES + ../3rdparty/masm/disassembler/udis86/udis86.c + ../3rdparty/masm/disassembler/udis86/udis86_decode.c + ../3rdparty/masm/disassembler/udis86/udis86_input.c + ../3rdparty/masm/disassembler/udis86/udis86_itab_holder.c + ../3rdparty/masm/disassembler/udis86/udis86_syn.c + ../3rdparty/masm/disassembler/udis86/udis86_syn-att.c + ../3rdparty/masm/disassembler/udis86/udis86_syn-intel.c +) + +#### Keys ignored in scope 73:.:../3rdparty/masm:../3rdparty/masm/masm.pri:DEFINES___contains___WTF_USE_UDIS86=1: +# ITAB = "$$PWD/disassembler/udis86/optable.xml" +# QMAKE_EXTRA_COMPILERS = "udis86" +# QMAKE_EXTRA_TARGETS = "udis86_tab_cfile" +# udis86.CONFIG = "no_link" +# udis86.commands = "python" "$$PWD/disassembler/udis86/itab.py" "${QMAKE_FILE_IN}" +# udis86.input = "ITAB" +# udis86.output = "udis86_itab.h" +# udis86_tab_cfile.depends = "udis86_itab.h" +# udis86_tab_cfile.target = "$$OUT_PWD/udis86_itab.c" + +#### Keys ignored in scope 75:.:../3rdparty/masm:../3rdparty/masm/masm.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): +# GENERATEDDIR = "$$GENERATEDDIR/debug" + +#### Keys ignored in scope 76:.:../3rdparty/masm:../3rdparty/masm/masm.pri:else: +# GENERATEDDIR = "$$GENERATEDDIR/release" + +qt_extend_target(Qml CONDITION (NOT c++11 AND NOT ICC) AND (CLANG) + COMPILE_OPTIONS + -Wno-c++0x-extensions + -Wno-c++11-extensions +) + +qt_extend_target(Qml CONDITION (((NOT c++11 AND NOT ICC) AND (NOT (CLANG))) AND (GCC)) AND ((QT_COMPILER_VERSION_MAJOR STRGREATER 4) OR (QT_COMPILER_VERSION_MINOR STRGREATER 5)) + COMPILE_OPTIONS + -Wno-c++0x-compat +) + + +qt_create_tracepoints(Qml qtqml.tracepoints) +qt_add_docs(Qml + doc/qtqml.qdocconf +) + + +set_target_properties(Qml PROPERTIES + QT_QML_MODULE_INSTALL_QMLTYPES TRUE + QT_QML_MODULE_VERSION ${CMAKE_PROJECT_VERSION} + QT_QML_MODULE_URI QtQml + QT_QML_MODULE_INSTALL_DIR "${INSTALL_QMLDIR}/QtQml" +) + +qt6_qml_type_registration(Qml) + +include(Qt6QmlBuildInternals.cmake) # special case diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake new file mode 100644 index 0000000000..a17cae8bf8 --- /dev/null +++ b/src/qml/Qt6QmlBuildInternals.cmake @@ -0,0 +1,174 @@ +# +# QtDeclarative Specific extensions +# + +include_guard(GLOBAL) + +# This function creates a CMake target for qml modules. It will also make +# sure that if no C++ source are present, that qml files show up in the project +# in an IDE. Finally, it will also create a custom ${target}_qmltypes which +# can be used to generate the respective plugin.qmltypes file. +# +# CPP_PLUGIN: Whether this qml module has any c++ source files. +# URI: Module's uri. +# TARGET_PATH: Expected installation path for the Qml Module. Equivalent +# to the module's URI where '.' is replaced with '/'. Use this to override the +# default substitution pattern. +# VERSION: Version of the qml module +# QML_PLUGINDUMP_DEPENDENCIES: Path to a dependencies.json file to be consumed +# with the ${target}_qmltypes target (optional) +# SKIP_TYPE_REGISTRATION: All qml files are expected to be registered by the +# c++ plugin code. +# +function(qt_add_qml_module target) + + set(qml_module_optional_args + GENERATE_QMLTYPES + DESIGNER_SUPPORTED + DO_NOT_INSTALL + SKIP_TYPE_REGISTRATION + ) + + set(qml_module_single_args + URI + TARGET_PATH + VERSION + QML_PLUGINDUMP_DEPENDENCIES + CLASSNAME + ) + + set(qml_module_multi_args + IMPORTS + TYPEINFO + DEPENDENCIES + ) + + qt_parse_all_arguments(arg "qt_add_qml_module" + "${__qt_add_plugin_optional_args};${qml_module_optional_args}" + "${__qt_add_plugin_single_args};${qml_module_single_args}" + "${__qt_add_plugin_multi_args};${qml_module_multi_args}" ${ARGN}) + + if (NOT arg_URI) + message(FATAL_ERROR "qt_add_qml_module called without specifying the module's uri. Please specify one using the URI parameter.") + endif() + + set(target_path ${arg_TARGET_PATH}) + + if (NOT arg_VERSION) + message(FATAL_ERROR "qt_add_qml_module called without specifying the module's import version. Please specify one using the VERSION parameter.") + endif() + + if (NOT arg_TARGET_PATH) + string(REPLACE "." "/" arg_TARGET_PATH ${arg_URI}) + endif() + + qt_remove_args(plugin_args + ARGS_TO_REMOVE + ${target} + ${qml_module_multi_args} + ${qml_module_single_args} + ALL_ARGS + ${__qt_add_plugin_optional_args} + ${__qt_add_plugin_single_args} + ${qml_module_single_args} + ${__qt_add_plugin_multi_args} + ${qml_module_multi_args} + ARGS + ${ARGV} + ) + + # If we have no sources, but qml files, create a custom target so the + # qml file will be visibile in an IDE. + if (arg_SOURCES) + qt_add_plugin(${target} + TYPE + qml_plugin + QML_TARGET_PATH + "${arg_TARGET_PATH}" + ${plugin_args} + ) + endif() + + + if (arg_CPP_PLUGIN) + set(no_create_option DO_NOT_CREATE_TARGET) + endif() + + if (arg_CLASSNAME) + set(classname_arg CLASSNAME ${arg_CLASSNAME}) + endif() + + if (arg_DESIGNER_SUPPORTED) + set(designer_supported_arg DESIGNER_SUPPORTED) + endif() + + if (arg_SKIP_TYPE_REGISTRATION) + set(skip_registration_arg SKIP_TYPE_REGISTRATION) + endif() + + if (arg_GENERATE_QMLTYPES) + set(generate_qmltypes_arg GENERATE_QMLTYPES) + endif() + + qt_path_join(qml_module_install_dir ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/${arg_TARGET_PATH}") + + qt6_add_qml_module(${target} + ${designer_supported_arg} + ${no_create_option} + ${skip_registration_arg} + ${classname_arg} + ${generate_qmltypes_arg} + RESOURCE_PREFIX "/qt-project.org/imports" + TARGET_PATH ${arg_TARGET_PATH} + URI ${arg_URI} + VERSION ${arg_VERSION} + QML_FILES ${arg_QML_FILES} + IMPORTS "${arg_IMPORTS}" + TYPEINFO "${arg_TYPEINFO}" + DO_NOT_INSTALL_METADATA + DO_NOT_CREATE_TARGET + INSTALL_QML_FILES + INSTALL_LOCATION "${qml_module_install_dir}" + DEPENDENCIES ${arg_DEPENDENCIES} + RESOURCE_EXPORT "${INSTALL_CMAKE_NAMESPACE}${target}Targets" + ) + + get_target_property(qmldir_file ${target} QT_QML_MODULE_QMLDIR_FILE) + get_target_property(plugin_types ${target} QT_QML_MODULE_PLUGIN_TYPES_FILE) + set(files_to_install) + if (EXISTS ${plugin_types}) + list(APPEND files_to_install ${plugin_types}) + qt_copy_or_install(FILES ${plugin_types} + DESTINATION "${qml_module_install_dir}" + ) + + if(QT_WILL_INSTALL) + # plugin.qmltypes when present should also be copied to the + # cmake binary dir when doing prefix builds + file(COPY ${plugin_types} + DESTINATION "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${arg_TARGET_PATH}" + ) + endif() + endif() + + list(APPEND files_to_install ${qmldir_file}) + if (QT_WILL_INSTALL) + install(FILES ${files_to_install} DESTINATION ${qml_module_install_dir}) + endif() + + set(copy_destination "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${arg_TARGET_PATH}") + foreach(file IN LISTS files_to_install) + get_filename_component(file_name "${file}" NAME) + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${file}" + "${copy_destination}/${file_name}" + COMMENT "Copying ${file} to ${copy_destination}" + ) + endforeach() +endfunction() + +function(add_qml_module) + qt_add_qml_module(${ARGV}) +endfunction() + diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake new file mode 100644 index 0000000000..869b8c507b --- /dev/null +++ b/src/qml/Qt6QmlMacros.cmake @@ -0,0 +1,583 @@ +# +# Q6QmlMacros +# + +# +# Create a Qml Module. Arguments: +# +# URI: Declares the module identifier of the module. The module identifier is +# the (dotted URI notation) identifier for the module, which must match the +# module's install path. (REQUIRED) +# +# VERSION: The module's version. (REQUIRED) +# +# TARGET_PATH: Overwrite the generated target path. By default the target path +# is generated from the URI by replacing the '.' with a '/'. However, under +# certain circumstance this may not be enough. Use this argument to provide +# a replacement. (OPTIONAL) +# +# RESOURCE_PREFIX: Resource Prefix to be used when generating a static library. +# When building a static library, the qmldir file is embedded into the library +# using rcc. It is is also used by the Qt Quick Compiler to embed compiled +# Qml files into a shared or static library. If none is supplied we will +# generate the following prefix: /org.qt-project/imports/${target_path}. +# (OPTIONAL) +# +# OUTPUT_DIRECTORY: If the module is not to be build under +# ${CMAKE_CURRENT_BINARY_DIR}. This ensures the qmldir file is copied to the +# right location. (OPTIONAL) +# +# INSTALL_LOCATION: Intended installation directory for this module. If no +# value is supplied, the default installation path will be ${INSTALL_QMLDIR}. +# (OPTIONAL). +# +# DO_NOT_INSTALL_METADATA: When present, will not install the supporting files. +# +# INSTALL_QML_FILES: When present, will install the qml files along side the +# plugin. +# +# SOURCES: List of C++ sources. (OPTIONAL) +# +# DEPENDENCIES: List of QML Module dependencies and their versions. The module +# and its version must be separated via a slash(/). E.g. QtQuick/2.0 +# +# QML_FILES: List of Qml files. See qt6_target_qml_files for more information +# on how to specify additional properties on qml files. (OPTIONAL) +# +# CLASSNAME: Provides the class name of the C++ plugin used by the module. This +# information is required for all the QML modules that depend on a C++ plugin +# for additional functionality. Qt Quick applications built with static +# linking cannot resolve the module imports without this information. +# (REQUIRED for static targets) +# +# DESIGNER_SUPPORTED: Specify this argument if the plugin is supported by Qt +# Quick Designer. By default, the plugin will not be supported. (OPTIONAL) +# +# TYPEINFO: Path to a file which declares a type description file for the module +# that can be read by QML tools such as Qt Creator to access information about +# the types defined by the module's plugins. (OPTIONAL) +# +# IMPORTS: List of other Qml Modules that this module imports. (OPTIONAL) +# +# RESOURCE_EXPORT: In static builds, when Qml files are processed via the Qt +# Quick Compiler generate a separate static library that will be linked in +# as an Interface. Supply an output variable to perform any custom actions +# on these extra generated targets. +# +# SKIP_TYPE_REGISTRATION: When present will cause the generated qmldir file +# to not list any qml types. These are expected to be registered by the +# c++ plugin code instead. +# + +function(qt6_add_qml_module target) + + set(args_optional + GENERATE_QMLTYPES + DESIGNER_SUPPORTED + DO_NOT_INSTALL_METADATA + SKIP_TYPE_REGISTRATION + INSTALL_QML_FILES + ) + + if (QT_BUILDING_QT) + list(APPEND args_optional DO_NOT_CREATE_TARGET) + endif() + + set(args_single + RESOURCE_PREFIX + URI + TARGET_PATH + VERSION + OUTPUT_DIRECTORY + INSTALL_LOCATION + CLASSNAME + TYPEINFO + RESOURCE_EXPORT + ) + + set(args_multi + SOURCES + QML_FILES + IMPORTS + DEPENDENCIES + ) + + cmake_parse_arguments(arg + "${args_optional}" + "${args_single}" + "${args_multi}" + ${ARGN} + ) + + if (NOT arg_URI) + message(FATAL_ERROR "qt6_add_qml_module called without a module URI. Please specify one using the URI argument.") + endif() + + if (NOT arg_VERSION) + message(FATAL_ERROR "qt6_add_qml_module called without a module version. Please specify one using the VERSION argument.") + endif() + + if (NOT "${arg_VERSION}" MATCHES "[0-9]+\\.[0-9]+") + message(FATAL_ERROR "qt6_add_qml_module called with an invalid version argument: '${arg_VERSION}'. Expected version style: VersionMajor.VersionMinor.") + endif() + + if (NOT BUILD_SHARED_LIBS AND NOT arg_CLASSNAME) + message(FATAL_ERROR "qt6_add_qml_module Static builds of Qml modules require a class name, none was provided. Please specify one using the CLASSNAME argument.") + endif() + + if (arg_DO_NOT_CREATE_TARGET AND NOT TARGET ${target}) + message(FATAL_ERROR "qt6_add_qml_module called with DO_NOT_CREATE_TARGET, but the given target '${target}' is not a cmake target") + endif() + + if (arg_DO_NOT_CREATE_TARGET) + get_target_property(target_type ${target} TYPE) + if (target_type STREQUAL "STATIC_LIBRARY") + set(is_static TRUE) + elseif(target_type STREQUAL "MODULE_LIBRARY") + set(is_static FALSE) + else() + message(FATAL_ERROR "qt6_add_qml_module called with DO_NOT_CREATE_TARGET, but target '${target}' is neither a static or a module library.") + endif() + else() + if(NOT BUILD_SHARED_LIBS) + add_library(${target} STATIC) + set(is_static TRUE) + else() + add_library(${target} MODULE) + set(is_static FALSE) + endif() + endif() + + if (NOT arg_TARGET_PATH) + string(REPLACE "." "/" arg_TARGET_PATH ${arg_URI}) + endif() + + if (NOT arg_RESOURCE_PREFIX) + set(arg_RESOURCE_PREFIX "/org.qt-project/imports") + endif() + + if (NOT arg_INSTALL_LOCATION) + set(arg_INSTALL_LOCATION "${INSTALL_QMLDIR}/${arg_TARGET_PATH}") + endif() + + set_target_properties(${target} + PROPERTIES + QT_QML_MODULE_TARGET_PATH ${arg_TARGET_PATH} + QT_QML_MODULE_URI ${arg_URI} + QT_RESOURCE_PREFIX ${arg_RESOURCE_PREFIX}/${arg_TARGET_PATH} + QT_QML_MODULE_VERSION ${arg_VERSION} + QT_QML_MODULE_INSTALL_DIR ${arg_INSTALL_LOCATION} + QT_QML_MODULE_RESOURCE_EXPORT "${arg_RESOURCE_EXPORT}" + ) + + if (arg_OUTPUT_DIRECTORY AND NOT DO_NOT_CREATE_TARGET) + set_target_properties(${target} + PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${arg_OUTPUT_DIRECTORY} + ARCHIVE_OUTPUT_DIRECTORY ${arg_OUTPUT_DIRECTORY} + ) + endif() + if (arg_OUTPUT_DIRECTORY) + set(target_output_dir ${arg_OUTPUT_DIRECTORY}) + else() + if(is_static) + get_target_property(target_output_dir ${target} ARCHIVE_OUTPUT_DIRECTORY) + else() + get_target_property(target_output_dir ${target} LIBRARY_OUTPUT_DIRECTORY) + endif() + endif() + + if (arg_INSTALL_QML_FILES) + set_target_properties(${target} PROPERTIES QT_QML_MODULE_INSTALL_QML_FILES TRUE) + endif() + + if (arg_SKIP_TYPE_REGISTRATION) + set_target_properties(${target} PROPERTIES QT_QML_MODULE_SKIP_TYPE_REGISTRATION TRUE) + endif() + + if (arg_SOURCES) + target_sources(${target} PRIVATE ${arg_SOURCES}) + endif() + + # Tracker so we can generate unique resource names for multiple + # target_qml_files() calls. + set_target_properties(${target} PROPERTIES QT6_QML_MODULE_ADD_QML_FILES_COUNT 1) + + # Generate qmldir file + set(qmldir_file "${CMAKE_CURRENT_BINARY_DIR}/qmldir") + set_target_properties(${target} PROPERTIES QT_QML_MODULE_QMLDIR_FILE ${qmldir_file}) + set(qmldir_file_contents "module ${arg_URI}\n") + string(APPEND qmldir_file_contents "plugin ${target}\n") + if (arg_CLASSNAME) + string(APPEND qmldir_file_contents "classname ${arg_CLASSNAME}\n") + endif() + if (arg_DESIGNER_SUPPORTED) + string(APPEND qmldir_file_contents "designersupported\n") + endif() + if (arg_TYPEINFO) + string(APPEND qmldir_file_contents "typeinfo ${arg_TYPEINFO}\n") + else() + # This always need to be written out since at the moment we have cases + # where qmltyperegistrar is not run with the plugin but on a module + # e.g: src/qml generates the qmltypes for src/imports/qtqml. + # When this has been fixed/standardized we should move this to + # qt6_qml_type_registration() so that it is written out when the + # plugins.qmltypes is actually generated. + string(APPEND qmldir_file_contents "typeinfo plugins.qmltypes\n") + endif() + foreach(import IN LISTS arg_IMPORTS) + string(APPEND qmldir_file_contents "import ${import}\n") + endforeach() + + foreach(dependency IN LISTS arg_DEPENDENCIES) + string(FIND ${dependency} "/" slash_position REVERSE) + if (slash_position EQUAL -1) + message(FATAL_ERROR "Dependencies should follow the format 'ModuleName/VersionMajor.VersionMinor'") + endif() + string(SUBSTRING ${dependency} 0 ${slash_position} dep_module) + math(EXPR slash_position "${slash_position} + 1") + string(SUBSTRING ${dependency} ${slash_position} -1 dep_version) + if (NOT dep_version MATCHES "[0-9]+\\.[0-9]+") + message(FATAL_ERROR "Invalid module dependency version number. Expected VersionMajor.VersionMinor.") + endif() + string(APPEND qmldir_file_contents "depends ${dep_module} ${dep_version}\n") + endforeach() + + file(WRITE ${qmldir_file} ${qmldir_file_contents}) + + # Process qml files + if (arg_QML_FILES) + qt6_target_qml_files(${target} FILES ${arg_QML_FILES}) + endif() + + # Embed qmldir in static builds + if (is_static) + string(REPLACE "/" "_" qmldir_resource_name ${arg_TARGET_PATH}) + string(APPEND qmldir_resource_name "_qmldir") + + set_source_files_properties("${qmldir_file}" + PROPERTIES QT_RESOURCE_ALIAS "qmldir" + ) + + set(resource_target "Foo") + QT6_ADD_RESOURCES(${target} ${qmldir_resource_name} + PREFIX ${target_resource_prefix} + FILES "${qmldir_file}" + OUTPUT_TARGETS resource_targets + ) + + if (resource_targets AND arg_RESOURCE_EXPORT) + install(TARGETS ${resource_targets} + EXPORT "${arg_RESOURCE_EXPORT}" + DESTINATION ${arg_INSTALL_LOCATION} + ) + endif() + else() + # Copy QMLDIR file to build directory + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${qmldir_file} + ${target_output_dir} + ) + + # Install QMLDIR file + if (NOT DO_NOT_INSTALL_METADATA) + install(FILES ${qmldir_file} + DESTINATION ${arg_INSTALL_LOCATION} + ) + endif() + endif() + + # Install and Copy plugin.qmltypes if exists + set(target_plugin_qmltypes "${CMAKE_CURRENT_SOURCE_DIR}/plugins.qmltypes") + if (EXISTS ${target_plugin_qmltypes}) + set_target_properties(${target} + PROPERTIES QT_QML_MODULE_PLUGIN_TYPES_FILE "${target_plugin_qmltypes}" + ) + file(APPEND ${qmldir_file} "typeinfo plugins.qmltypes\n") + if (NOT arg_DO_NOT_INSTALL_METADATA) + install(FILES ${target_plugin_qmltypes} + DESTINATION ${arg_INSTALL_LOCATION} + ) + endif() + + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${target_plugin_qmltypes} + ${target_output_dir} + ) + endif() + + # Copy/Install type info file + if (EXISTS ${arg_TYPEINFO}) + if (NOT arg_DO_NOT_INSTALL_METADATA) + install(FILES ${arg_TYPEINFO} + DESTINATION ${arg_INSTALL_LOCATION} + ) + endif() + + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${arg_TYPEINFO} + ${target_output_dir} + ) + endif() + + # Generate meta types data + if (arg_GENERATE_QMLTYPES) + qt6_qml_type_registration(${target}) + endif() +endfunction() + + +# +# Add Qml files (.qml,.js,.mjs) to a Qml module. This will also append the +# qml files to the qmldir file of the module. Two source file properties can +# be used to control the generated qmldir entry. +# +# QT_QML_SOURCE_VERSION: Version for this qml file. If not present the module +# version will be used. +# QT_QML_SOURCE_TYPENAME: Override the file's type name. If not present the +# type name will be deduced using the file's basename. +# QT_QML_SINGLETON_TYPE: Set to true if this qml file contains a singleton +# type. +# QT_QML_INTERNAL_TYPE: When set to true, the type specified by +# QT_QML_SOURCE_TYPENAME will not be available to users of this module. +# +# e.g.: +# set_source_files_properties(my_qml_file.qml +# PROPERTIES +# QT_QML_SOURCE_VERSION 2.0 +# QT_QML_SOURCE_TYPENAME MyQmlFile +# +# qt6_target_qml_files(my_qml_module +# FILES +# my_qml_file.qml +# ) +# +# Will produce the following entry in the qmldir file +# +# MyQmlFile 2.0 my_qml_file.qml +# +# +function(qt6_target_qml_files target) + + cmake_parse_arguments(arg "" "" "FILES" ${ARGN}) + get_target_property(resource_count ${target} QT6_QML_MODULE_ADD_QML_FILES_COUNT) + get_target_property(qmldir_file ${target} QT_QML_MODULE_QMLDIR_FILE) + get_target_property(install_qml_files ${target} QT_QML_MODULE_INSTALL_QML_FILES) + if (NOT qmldir_file) + message(FATAL_ERROR "qt6_target_qml_file: ${target} is not a Qml module") + endif() + + if (NOT arg_FILES) + return() + endif() + math(EXPR new_count "${resource_count} + 1") + set_target_properties(${target} PROPERTIES QT6_QML_MODULE_ADD_QML_FILES_COUNT ${new_count}) + + qt6_add_resources(${target} "qml_files${new_count}" + FILES ${arg_FILES} + OUTPUT_TARGETS resource_targets + ) + get_target_property(skip_type_registration ${target} QT_QML_MODULE_SKIP_TYPE_REGISTRATION) + get_target_property(target_resource_export ${target} QT_QML_MODULE_RESOURCE_EXPORT) + get_target_property(qml_module_install_dir ${target} QT_QML_MODULE_INSTALL_DIR) + if (resource_targets) + install(TARGETS ${resource_targets} + EXPORT "${target_resource_export}" + DESTINATION ${qm_module_install_dir} + ) + endif() + + set(file_contents "") + foreach(qml_file IN LISTS arg_FILES) + if (install_qml_files) + if (NOT QT_WILL_INSTALL) + file(COPY "${qml_file}" DESTINATION "${qml_module_install_dir}") + else() + install(FILES "${qml_file}" DESTINATION "${qml_module_install_dir}") + endif() + endif() + + if (skip_type_registration AND qml_file MATCHES "\\.qml$") + continue() + endif() + get_source_file_property(qml_file_version ${qml_file} QT_QML_SOURCE_VERSION) + get_source_file_property(qml_file_typename ${qml_file} QT_QML_SOURCE_TYPENAME) + get_source_file_property(qml_file_singleton ${qml_file} QT_QML_SINGLETON_TYPE) + get_source_file_property(qml_file_internal ${qml_file} QT_QML_INTERNAL_TYPE) + get_target_property(qml_module_version ${target} QT_QML_MODULE_VERSION) + + if (NOT qml_file_version) + set(qml_file_version ${qml_module_version}) + endif() + + if (NOT qml_file_typename) + get_filename_component(qml_file_typename ${qml_file} NAME_WLE) + endif() + + if (qml_file_singleton) + string(APPEND file_contents "[singleton] ") + endif() + + string(APPEND file_contents "${qml_file_typename} ${qml_file_version} ${qml_file}\n") + + if (qml_file_internal) + string(APPEND file_contents "internal ${qml_file_typename} ${qml_file}\n") + endif() + + endforeach() + file(APPEND ${qmldir_file} ${file_contents}) +endfunction() + +function(qt6_qml_type_registration target) + + get_target_property(import_name ${target} QT_QML_MODULE_URI) + if (NOT import_name) + message(FATAL_ERROR "Target ${target} is not a QML module") + endif() + + cmake_parse_arguments(args "COPY_OVER_INSTALL" "INSTALL_DIR" "" ${ARGN}) + + set(meta_types_args) + if (QT_BUILDING_QT AND NOT QT_WILL_INSTALL) + set(arg_COPY_OVER_INSTALL TRUE) + endif() + if (arg_INSTALL_DIR) + list(APPEND meta_types_args INSTALL_DIR "${arg_INSTALL_DIR}") + endif() + if (arg_COPY_OVER_INSTALL) + list(APPEND meta_types_args COPY_OVER_INSTALL) + endif() + + qt6_generate_meta_types_json_file(${target} ${meta_types_args}) + + get_target_property(import_version ${target} QT_QML_MODULE_VERSION) + get_target_property(target_source_dir ${target} SOURCE_DIR) + get_target_property(target_binary_dir ${target} BINARY_DIR) + get_target_property(target_metatypes_file ${target} INTERFACE_QT_META_TYPES_BUILD_FILE) + if (NOT target_metatypes_file) + message(FATAL_ERROR "Target ${target} does not have a meta types file") + endif() + + # Extract major and minor version + if (NOT import_version MATCHES "[0-9]+\\.[0-9]+") + message(FATAL_ERROR "Invalid module dependency version number. Expected VersionMajor.VersionMinor.") + endif() + string(FIND "${import_version}" "." dot_location) + string(SUBSTRING ${import_version} 0 ${dot_location} major_version) + math(EXPR dot_location "${dot_location}+1") + string(SUBSTRING ${import_version} ${dot_location} -1 minor_version) + + # check if plugins.qmltypes is already defined + get_target_property(target_plugin_qmltypes ${target} QT_QML_MODULE_PLUGIN_TYPES_FILE) + if (target_plugin_qmltypes) + message(FATAL_ERROR "Target ${target} already has a plugins.qmltypes set.") + endif() + + set(cmd_args) + set(plugin_types_file ${target_binary_dir}/plugins.qmltypes) + set_target_properties(${target} PROPERTIES + QT_QML_MODULE_PLUGIN_TYPES_FILE ${plugin_types_file} + ) + list(APPEND cmd_args + --generate-qmltypes=${plugin_types_file} + --import-name=${import_name} + --major-version=${major_version} + --minor-version=${minor_version} + ) + + # Run a script to recursively evaluate all the metatypes.json files in order + # to collect all foreign types. + string(TOLOWER "${target}_qmltyperegistrations.cpp" type_registration_cpp_file_name) + set(foreign_types_file "${target_binary_dir}/qmltypes/foreign_types.txt") + set(type_registration_cpp_file "${target_binary_dir}/${type_registration_cpp_file_name}") + + set(dependency_file_cpp "${target_binary_dir}/qmltypes/${type_registration_cpp_file_name}.d") + file(RELATIVE_PATH cpp_file_name "${${CMAKE_PROJECT_NAME}_BINARY_DIR}" "${type_registration_cpp_file}") + + set (use_dep_files FALSE) + if (CMAKE_GENERATOR STREQUAL "Ninja" OR CMAKE_GENERATOR STREQUAL "Ninja Multi-Config") + set(use_dep_files TRUE) + endif() + + # Enable evaluation of metatypes.json source interfaces + set_target_properties(${target} PROPERTIES QT_CONSUMES_METATYPES TRUE) + set(genex_list "$<REMOVE_DUPLICATES:$<FILTER:$<TARGET_PROPERTY:${target},SOURCES>,INCLUDE,metatypes.json$>>") + set(genex_main "$<JOIN:${genex_list},$<COMMA>>") + file(GENERATE OUTPUT "${foreign_types_file}" + CONTENT "$<IF:$<BOOL:${genex_list}>,--foreign-types=${genex_main},\n>" + ) + + list(APPEND cmd_args + "@${foreign_types_file}" + ) + + set(dependencies_json_file "${target_source_dir}/dependencies.json") + if (EXISTS ${dependencies_json_file}) + list(APPEND cmd_args --dependencies=${dependencies_json_file}) + endif() + + if (TARGET ${target}Private) + list(APPEND cmd_args --private-includes) + endif() + + get_target_property(target_metatypes_json_file ${target} INTERFACE_QT_META_TYPES_BUILD_FILE) + if (NOT target_metatypes_json_file) + message(FATAL_ERROR "Need target metatypes.json file") + endif() + + set(registration_cpp_file_dep_args) + if (use_dep_files) + set(registration_cpp_file_dep_args DEPFILE ${dependency_file_cpp}) + file(GENERATE OUTPUT "${dependency_file_cpp}" + CONTENT "${cpp_file_name}: $<IF:$<BOOL:${genex_list}>,\\\n$<JOIN:${genex_list}, \\\n>, \\\n>" + ) + endif() + + set(extra_env_command) + if (WIN32) + file(TO_NATIVE_PATH "${${PROJECT_NAME}_BINARY_DIR}/bin$<SEMICOLON>${CMAKE_INSTALL_PREFIX}/${INSTALL_BINDIR}$<SEMICOLON>%PATH%" env_path_native) + set(extra_env_command COMMAND set PATH=${env_path_native}) + endif() + add_custom_command(OUTPUT ${type_registration_cpp_file} + DEPENDS + ${foreign_types_file} + ${target_metatypes_json_file} + ${QT_CMAKE_EXPORT_NAMESPACE}::qmltyperegistrar + ${extra_env_command} + COMMAND + $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qmltyperegistrar> + ${cmd_args} + -o ${type_registration_cpp_file} + ${target_metatypes_json_file} + ${registration_cpp_file_dep_args} + COMMENT "Automatic QML type registration for target ${target}" + ) + + target_sources(${target} PRIVATE ${type_registration_cpp_file}) + set_source_files_properties(${type_registration_cpp_file} PROPERTIES + SKIP_AUTOGEN ON + ) + + # Only install qml types if necessary + get_target_property(install_qmltypes ${target} QT_QML_MODULE_INSTALL_QMLTYPES) + if (install_qmltypes) + get_target_property(qml_install_dir ${target} QT_QML_MODULE_INSTALL_DIR) + if(NOT arg_COPY_OVER_INSTALL) + install(FILES ${plugin_types_file} DESTINATION ${qml_install_dir}) + else() + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${plugin_types_file}" + "${qml_install_dir}/plugins.qmltypes" + COMMENT "Copying ${plugin_types_file} to ${qml_install_dir}" + ) + endif() + endif() + + target_include_directories(${target} PRIVATE + $<TARGET_PROPERTY:Qt::QmlPrivate,INTERFACE_INCLUDE_DIRECTORIES> + ) +endfunction() diff --git a/src/qml/configure.cmake b/src/qml/configure.cmake new file mode 100644 index 0000000000..7a337b2714 --- /dev/null +++ b/src/qml/configure.cmake @@ -0,0 +1,189 @@ + + +#### Inputs + + + +#### Libraries + + + +#### Tests + +# cxx14_make_unique +qt_config_compile_test(cxx14_make_unique + LABEL "C++14 make_unique()" + CODE +" +#include <memory> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +std::unique_ptr<int> ptr = std::make_unique<int>(); + /* END TEST: */ + return 0; +} +") + +# pointer_32bit +qt_config_compile_test(pointer_32bit + LABEL "32bit pointers" + CODE +" + + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +static_assert(sizeof(void *) == 4, \"fail\"); + /* END TEST: */ + return 0; +} +") + +# pointer_64bit +qt_config_compile_test(pointer_64bit + LABEL "64bit pointers" + CODE +" + + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +static_assert(sizeof(void *) == 8, \"fail\"); + /* END TEST: */ + return 0; +} +") + +# arm_thumb +qt_config_compile_test(arm_thumb + LABEL "THUMB mode on ARM" + CODE +" + + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +#if defined(thumb2) || defined(__thumb2__) +# define THUMB_OK +#elif (defined(__thumb) || defined(__thumb__)) && __TARGET_ARCH_THUMB-0 == 4 +# define THUMB_OK +#elif defined(__ARM_ARCH_ISA_THUMB) && __ARM_ARCH_ISA_THUMB == 2 +// clang 3.5 and later will set this if the core supports the Thumb-2 ISA. +# define THUMB_OK +#else +# error \"fail\" +#endif + /* END TEST: */ + return 0; +} +") + +# arm_fp +qt_config_compile_test(arm_fp + LABEL "Sufficiently recent FPU on ARM" + CODE +" + + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +// if !defined(__ARM_FP) we might be on MSVC or we might have a device +// without an FPU. +// TODO: The latter case is not supported, but the test still succeeds. +#if defined(__ARM_FP) && (__ARM_FP <= 0x04) +# error \"fail\" +#endif + /* END TEST: */ + return 0; +} +") + + + +#### Features + +qt_feature("cxx14_make_unique" PRIVATE + LABEL "C++14 make_unique" + CONDITION QT_FEATURE_cxx14 OR TEST_cxx14_make_unique +) +qt_feature("qml-network" PUBLIC + SECTION "QML" + LABEL "QML network support" + PURPOSE "Provides network transparency." + CONDITION QT_FEATURE_network +) +# On arm and arm64 we need a specialization of cacheFlush() for each OS to be enabeled. Therefore the config white list. Also Mind that e.g. x86_32 has arch.x86_64 but 32bit pointers. Therefore the checks for architecture and pointer size. Finally, ios and tvos can technically use the JIT but Apple does not allow it. Therefore, it's disabled by default. +qt_feature("qml-jit" PRIVATE + SECTION "QML" + LABEL "QML just-in-time compiler" + PURPOSE "Provides a JIT for QML and JavaScript" + AUTODETECT NOT APPLE_IOS AND NOT APPLE_TVOS + CONDITION ( ( ( TEST_architecture_arch STREQUAL i386 ) AND TEST_pointer_32bit AND QT_FEATURE_sse2 ) OR ( ( TEST_architecture_arch STREQUAL x86_64 ) AND TEST_pointer_64bit AND QT_FEATURE_sse2 ) OR ( ( TEST_architecture_arch STREQUAL arm ) AND TEST_pointer_32bit AND TEST_arm_fp AND TEST_arm_thumb AND ( LINUX OR APPLE_IOS OR APPLE_TVOS OR QNX ) ) OR ( ( TEST_architecture_arch STREQUAL arm64 ) AND TEST_pointer_64bit AND TEST_arm_fp AND ( LINUX OR APPLE_IOS OR APPLE_TVOS OR QNX OR INTEGRITY ) ) ) +) +qt_feature("qml-debug" PUBLIC + SECTION "QML" + LABEL "QML debugging and profiling support" + PURPOSE "Provides infrastructure and plugins for debugging and profiling." +) +qt_feature("qml-profiler" PRIVATE + SECTION "QML" + LABEL "Command line QML Profiler" + PURPOSE "Supports retrieving QML tracing data from an application." + CONDITION ( QT_FEATURE_commandlineparser ) AND ( QT_FEATURE_qml_debug ) AND ( QT_FEATURE_qml_network AND QT_FEATURE_localserver ) AND ( QT_FEATURE_xmlstreamwriter ) +) +qt_feature("qml-preview" PRIVATE + SECTION "QML" + LABEL "Command line QML Preview tool" + PURPOSE "Updates QML documents in your application live as you change them on disk" + CONDITION ( QT_FEATURE_commandlineparser ) AND ( QT_FEATURE_filesystemwatcher ) AND ( QT_FEATURE_qml_network AND QT_FEATURE_localserver ) AND ( QT_FEATURE_process ) AND ( QT_FEATURE_qml_debug ) +) +qt_feature("qml-devtools" PRIVATE + SECTION "QML" + LABEL "QML Development Tools" + PURPOSE "Provides the QmlDevtools library and various utilities." +) +qt_feature("qml-sequence-object" PRIVATE + SECTION "QML" + LABEL "QML sequence object" + PURPOSE "Supports mapping sequence types into QML." +) +qt_feature("qml-xml-http-request" PRIVATE + SECTION "QML" + LABEL "QML XML http request" + PURPOSE "Provides support for sending XML http requests." + CONDITION ( QT_FEATURE_xmlstreamreader ) AND ( QT_FEATURE_qml_network ) +) +qt_feature("qml-locale" PRIVATE + SECTION "QML" + LABEL "QML Locale" + PURPOSE "Provides support for locales in QML." +) +qt_feature("qml-animation" PRIVATE + SECTION "QML" + LABEL "QML Animations" + PURPOSE "Provides support for animations and timers in QML." + CONDITION QT_FEATURE_animation +) +qt_feature("qml-worker-script" PRIVATE + SECTION "QML" + LABEL "QML WorkerScript" + PURPOSE "Enables the use of threads in QML." + CONDITION QT_FEATURE_thread +) +qt_feature("qml-itemmodel" PRIVATE + SECTION "QML" + LABEL "QML Item Model" + PURPOSE "Provides the item model for item views in QML" + CONDITION QT_FEATURE_itemmodel +) diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index b8b7545ed8..725d2e7c7a 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1330,7 +1330,7 @@ void QQmlEngine::setOutputWarningsToStandardError(bool enabled) QObject* example: \code class MySingleton : public QObject { - Q_OBJECT + \Q_OBJECT // Register as default constructed singleton. QML_ELEMENT diff --git a/src/qml/qml/qqmlparserstatus.cpp b/src/qml/qml/qqmlparserstatus.cpp index b8f4bb8c19..cd45e6668b 100644 --- a/src/qml/qml/qqmlparserstatus.cpp +++ b/src/qml/qml/qqmlparserstatus.cpp @@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE \code class MyObject : public QObject, public QQmlParserStatus { - Q_OBJECT + \Q_OBJECT Q_INTERFACES(QQmlParserStatus) public: |
