File: qtCompat.cmake

package info (click to toggle)
cppcheck 2.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,132 kB
  • sloc: cpp: 268,935; python: 20,890; ansic: 8,090; sh: 1,045; makefile: 1,008; xml: 1,005; cs: 291
file content (43 lines) | stat: -rw-r--r-- 1,306 bytes parent folder | download | duplicates (2)
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
41
42
43
if(QT_VERSION VERSION_LESS 5.15)
    # "versionless" Qt is not supported until 5.15 so we need to use wrappers

    function(qt_wrap_ui out)
        qt5_wrap_ui(_uis_hdrs ${ARGN})
        set("${out}" ${_uis_hdrs} PARENT_SCOPE)
    endfunction()

    function(qt_add_resources out)
        qt5_add_resources(_resources ${ARGN})
        set("${out}" ${_resources} PARENT_SCOPE)
    endfunction()

    function(qt_create_translation out)
        qt5_create_translation(_qms ${ARGN})
        set("${out}" ${_qms} PARENT_SCOPE)
    endfunction()

    function(qt_wrap_cpp out)
        qt5_wrap_cpp(_sources ${ARGN})
        set("${out}" ${_sources} PARENT_SCOPE)
    endfunction()

    set(QT_CORE_LIB Qt5::Core)
    set(QT_TEST_LIB Qt5::Test)
    set(QT_WIDGETS_LIB Qt5::Widgets)
    set(QT_GUI_LIB Qt5::Gui)
    set(QT_HELP_LIB Qt5::Help)
    set(QT_PRINTSUPPORT_LIB Qt5::PrintSupport)
    set(QT_CHARTS_LIB Qt5::Charts)
    set(QT_NETWORK_LIB Qt5::Network)
else()
    # use "versionless" targets - no need for wrapper functions

    set(QT_CORE_LIB Qt::Core)
    set(QT_TEST_LIB Qt::Test)
    set(QT_WIDGETS_LIB Qt::Widgets)
    set(QT_GUI_LIB Qt::Gui)
    set(QT_HELP_LIB Qt::Help)
    set(QT_PRINTSUPPORT_LIB Qt::PrintSupport)
    set(QT_CHARTS_LIB Qt::Charts)
    set(QT_NETWORK_LIB Qt::Network)
endif()