summaryrefslogtreecommitdiff
path: root/src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl
blob: 2068acc1272e3310ba8c6394bacbc945c250b90e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# TODO We probably dont' need this template at all in the cmake case
# Keep it until the templates have been adapted and everything can be done without autogenerating

if (NOT TARGET ${CURRENT_TARGET})
    string(REPLACE "." "/" TARGET_PATH "{{module|qml_type}}")
    qt_add_qml_module(${CURRENT_TARGET}
        URI "{{module|qml_type}}"
        VERSION "{{module.majorVersion}}.{{module.minorVersion}}"
        SKIP_TYPE_REGISTRATION
        # TODO remove this again
        # This is needed to make the test build work as it would create duplicate qmldir entries
        # in the global qml folder
        OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PATH}
        PUBLIC_LIBRARIES
            Qt::IviCore
        SOURCES
            plugin.cpp
    )
else()
    target_sources(${CURRENT_TARGET}
                   PRIVATE
        plugin.cpp
    )
endif()

#set_target_properties(${CURRENT_TARGET} PROPERTIES
#    QT_QML_MODULE_VERSION {{module.majorVersion}}.{{module.minorVersion}}
#    QT_QML_MODULE_URI {{module|qml_type}}
#    QT_QMLTYPES_FILENAME plugins.qmltypes
#)

### MISSING
# AUX_QML_FILES += $$PWD/qmldir \
#    $$PWD/designer/{{module.module_name|lower}}.metainfo