aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlpreview/CMakeLists.txt
blob: 40114a7e47c2a3ae4a2d12aca12948db20fc3be5 (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
35
36
37
38
39
40
add_qtc_plugin(QmlPreview
  CONDITION TARGET QmlProjectManager
  PUBLIC_DEPENDS QmlDebug
  DEPENDS QmlJS
  PLUGIN_DEPENDS
    Core ProjectExplorer QmlJSTools QtSupport
    ResourceEditor QmlProjectManager
  SOURCES
    qmlpreviewclient.cpp qmlpreviewclient.h
    qmlpreviewconnectionmanager.cpp qmlpreviewconnectionmanager.h
    qmlpreviewfileontargetfinder.cpp qmlpreviewfileontargetfinder.h
    qmlpreviewplugin.cpp qmlpreviewplugin.h
    qmlpreviewruncontrol.cpp qmlpreviewruncontrol.h
    qmldebugtranslationclient.cpp qmldebugtranslationclient.h
    qmlpreview_global.h
    qmlpreviewtr.h
)

extend_qtc_plugin(QmlPreview
  CONDITION WITH_TESTS
  SOURCES
    tests/qmlpreviewclient_test.cpp tests/qmlpreviewclient_test.h
    tests/qmlpreviewplugin_test.cpp tests/qmlpreviewplugin_test.h
)

if(TARGET Qt6::QmlPrivate)
  get_target_property(qmldebugprivate_include_directories
                      Qt6::QmlPrivate
                      INTERFACE_INCLUDE_DIRECTORIES
  )
  find_file(have_qml_debug_translation_protocol
    NAMES private/qqmldebugtranslationprotocol_p.h
    PATHS ${qmldebugprivate_include_directories}
  )
  extend_qtc_plugin(QmlPreview
    CONDITION have_qml_debug_translation_protocol
    PUBLIC_DEPENDS Qt::QmlPrivate
    PUBLIC_DEFINES "FOUND_QML_DEBUG_TRANSLATION_PROTOCOL"
  )
endif()