forked from danmar/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqtCompat.cmake
More file actions
43 lines (37 loc) · 1.28 KB
/
qtCompat.cmake
File metadata and controls
43 lines (37 loc) · 1.28 KB
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()