Add in QtWraps.cmake Qt modules, task #11
This commit is contained in:
@@ -139,6 +139,28 @@ if (POLICY CMP0074)
|
||||
endif()
|
||||
set(__qt_bug_modules "UiTools")
|
||||
|
||||
set(__qt_modules_4 "CLucene;Core;Declarative;Gui;Help;main;Multimedia;Network;OpenGL;\
|
||||
Script;ScriptTools;Sql;Svg;Test;UiTools;UiToolsd;WebKit;Xml;XmlPatterns")
|
||||
|
||||
set(__qt_modules_5 "3DAnimation;3DCore;3DExtras;3DInput;3DLogic;3DQuick;3DQuickAnimation;\
|
||||
3DQuickExtras;3DQuickInput;3DQuickRender;3DQuickScene2D;3DRender;AccessibilitySupport;\
|
||||
AttributionsScannerTools;AxBase;AxContainer;AxServer;Bluetooth;Bootstrap;Concurrent;\
|
||||
Core;DataVisualization;DBus;Designer;DesignerComponents;DeviceDiscoverySupport;DocTools;EdidSupport;\
|
||||
EglSupport;EventDispatcherSupport;FbSupport;FontDatabaseSupport;Gamepad;Gui;Help;\
|
||||
LinguistTools;Location;Multimedia;MultimediaQuick;MultimediaWidgets;Network;NetworkAuth;\
|
||||
Nfc;OpenGL;OpenGLExtensions;PacketProtocol;PlatformCompositorSupport;Positioning;\
|
||||
PositioningQuick;PrintSupport;Qml;QmlDebug;QmlDevTools;QmlImportScanner;QmlModels;\
|
||||
QmlWorkerScript;Quick;QuickCompiler;QuickControls2;QuickParticles;QuickShapes;QuickTemplates2;\
|
||||
QuickTest;QuickWidgets;RemoteObjects;RepParser;Scxml;Sensors;SerialBus;SerialPort;\
|
||||
Sql;Svg;Test;TextToSpeech;ThemeSupport;UiPlugin;UiTools;VulkanSupport;WebChannel;WebSockets;\
|
||||
Widgets;WindowsUIAutomationSupport;WinExtras;Xml;XmlPatterns;Zlib;Charts")
|
||||
|
||||
set(__qt_modules_6 "Concurrent;Core;DBus;Designer;DeviceDiscoverySupport;FbSupport;\
|
||||
Gui;Help;HostInfo;Linguist;Network;OpenGL;OpenGLWidgets;PacketProtocol;PrintSupport;\
|
||||
Qml;QmlDebug;QmlDevTools;QmlImportScanner;QmlModels;QmlTools;QmlWorkerScript;Quick;\
|
||||
QuickControls2;QuickParticles;QuickShapes;QuickTemplates2;QuickTest;QuickWidgets;\
|
||||
ShaderTools;Sql;Svg;SvgWidgets;Test;Tools;UiPlugin;UiTools;Widgets;Xml")
|
||||
|
||||
|
||||
set(_QT_VERSIONS_ 4 5)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
@@ -203,10 +225,12 @@ macro(find_qt)
|
||||
get_filename_component(Qt4_BIN ${QT_QMAKE_EXECUTABLE} PATH)
|
||||
set(Qt4_INCLUDES ${QT_INCLUDES})
|
||||
foreach(m ${_QCOMP})
|
||||
string(TOUPPER "${m}" _um)
|
||||
#message("${QT_QT${_um}_FOUND}")
|
||||
if (${QT_QT${_um}_FOUND})
|
||||
list(APPEND Qt4_LIBRARIES ${QT_QT${_um}_LIBRARY})
|
||||
if (m IN_LIST __qt_modules_4)
|
||||
string(TOUPPER "${m}" _um)
|
||||
#message("${QT_QT${_um}_FOUND}")
|
||||
if (${QT_QT${_um}_FOUND})
|
||||
list(APPEND Qt4_LIBRARIES ${QT_QT${_um}_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
set(Qt4_PLUGINS_DIR ${QT_PLUGINS_DIR} CACHE STRING "")
|
||||
@@ -219,7 +243,9 @@ macro(find_qt)
|
||||
#if (Qt5_FOUND)
|
||||
# set(_MSG 0)
|
||||
#endif()
|
||||
find_package(Qt5 COMPONENTS Core LinguistTools UiPlugin Widgets ${_QCOMP} QUIET)
|
||||
set(_QCOMP5 Core LinguistTools UiPlugin Widgets ${_QCOMP})
|
||||
list(REMOVE_DUPLICATES _QCOMP5)
|
||||
find_package(Qt5 COMPONENTS ${_QCOMP5} QUIET)
|
||||
if (DEFINED ANDROID_PLATFORM)
|
||||
set(CMAKE_SHARED_MODULE_SUFFIX_CXX ".so")
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX_CXX ".so")
|
||||
@@ -229,21 +255,22 @@ macro(find_qt)
|
||||
if (Qt5Core_FOUND)
|
||||
set(LOCAL_FOUND5 1)
|
||||
set(_Qt5Modules)
|
||||
foreach(m ${_QCOMP})
|
||||
#message(STATUS "Qt5${m}")
|
||||
if (${Qt5${m}_FOUND})
|
||||
set(__lib ${Qt5${m}_LIBRARIES})
|
||||
if (DEFINED ANDROID_PLATFORM)
|
||||
if (m IN_LIST __qt_bug_modules)
|
||||
get_target_property(__lib Qt5::${m} LOCATION)
|
||||
foreach(m ${_QCOMP5})
|
||||
if (m IN_LIST __qt_modules_5)
|
||||
if (${Qt5${m}_FOUND})
|
||||
set(__lib ${Qt5${m}_LIBRARIES})
|
||||
if (DEFINED ANDROID_PLATFORM)
|
||||
if (m IN_LIST __qt_bug_modules)
|
||||
get_target_property(__lib Qt5::${m} LOCATION)
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND _Qt5Modules ${m})
|
||||
list(APPEND Qt5_INCLUDES ${Qt5${m}_INCLUDE_DIRS})
|
||||
list(APPEND Qt5_LIBRARIES ${__lib})
|
||||
else()
|
||||
if (NOT "x${_QUIET}" STREQUAL "xQUIET")
|
||||
message(FATAL_ERROR "Qt5${m} NOT FOUND")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND _Qt5Modules ${m})
|
||||
list(APPEND Qt5_INCLUDES ${Qt5${m}_INCLUDE_DIRS})
|
||||
list(APPEND Qt5_LIBRARIES ${__lib})
|
||||
else()
|
||||
if (NOT "x${_QUIET}" STREQUAL "xQUIET")
|
||||
message(FATAL_ERROR "Qt5${m} NOT FOUND")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
Reference in New Issue
Block a user