mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
Use more versionless Qt and remove obsolete condition
QtQml is REQUIRED
This commit is contained in:
parent
26c656b6ae
commit
defa363d07
@ -2364,18 +2364,9 @@ if (MSVC)
|
||||
endif()
|
||||
|
||||
target_include_directories(qgis_core SYSTEM PUBLIC
|
||||
${${QT_VERSION_BASE}Core_INCLUDE_DIRS}
|
||||
${${QT_VERSION_BASE}Gui_INCLUDE_DIRS}
|
||||
${${QT_VERSION_BASE}Xml_INCLUDE_DIRS}
|
||||
${${QT_VERSION_BASE}Widgets_INCLUDE_DIRS}
|
||||
${${QT_VERSION_BASE}Svg_INCLUDE_DIRS}
|
||||
${${QT_VERSION_BASE}Network_INCLUDE_DIRS}
|
||||
${${QT_VERSION_BASE}Sql_INCLUDE_DIRS}
|
||||
${${QT_VERSION_BASE}Concurrent_INCLUDE_DIRS}
|
||||
${LIBZIP_INCLUDE_DIRS}
|
||||
${SPATIALINDEX_INCLUDE_DIR} # before GEOS for case-insensitive filesystems
|
||||
${QCA_INCLUDE_DIR}
|
||||
${${QT_VERSION_BASE}SerialPort_INCLUDE_DIRS}
|
||||
${Protobuf_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${EXIV2_INCLUDE_DIR}
|
||||
@ -2476,7 +2467,7 @@ GENERATE_EXPORT_HEADER(
|
||||
set(QGIS_CORE_HDRS ${QGIS_CORE_HDRS} ${CMAKE_CURRENT_BINARY_DIR}/qgis_core.h)
|
||||
|
||||
if(ENABLE_MODELTEST)
|
||||
target_link_libraries(qgis_core ${QT_VERSION_BASE}::Test)
|
||||
target_link_libraries(qgis_core Qt::Test)
|
||||
endif()
|
||||
|
||||
if (NOT WITH_INTERNAL_POLY2TRI)
|
||||
@ -2540,15 +2531,15 @@ if (APPLE)
|
||||
endif()
|
||||
|
||||
target_link_libraries(qgis_core
|
||||
${QT_VERSION_BASE}::Core
|
||||
${QT_VERSION_BASE}::Gui
|
||||
${QT_VERSION_BASE}::Xml
|
||||
${QT_VERSION_BASE}::Widgets
|
||||
${QT_VERSION_BASE}::Svg
|
||||
${QT_VERSION_BASE}::Network
|
||||
${QT_VERSION_BASE}::Sql
|
||||
${QT_VERSION_BASE}::Concurrent
|
||||
${QT_VERSION_BASE}::Positioning
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Xml
|
||||
Qt::Widgets
|
||||
Qt::Svg
|
||||
Qt::Network
|
||||
Qt::Sql
|
||||
Qt::Concurrent
|
||||
Qt::Positioning
|
||||
${OPTIONAL_QTWEBKIT}
|
||||
${QCA_LIBRARY}
|
||||
GEOS::geos_c
|
||||
@ -2575,8 +2566,7 @@ else()
|
||||
endif()
|
||||
|
||||
if (WITH_QTPRINTER)
|
||||
target_link_libraries(qgis_core ${QT_VERSION_BASE}::PrintSupport)
|
||||
target_include_directories(qgis_core SYSTEM PUBLIC ${${QT_VERSION_BASE}PrintSupport_INCLUDE_DIRS})
|
||||
target_link_libraries(qgis_core Qt::PrintSupport)
|
||||
endif()
|
||||
|
||||
if (WITH_DRACO)
|
||||
@ -2612,13 +2602,13 @@ endif()
|
||||
if (WITH_QTWEBENGINE)
|
||||
if(BUILD_WITH_QT6)
|
||||
target_link_libraries(qgis_core
|
||||
${QT_VERSION_BASE}::WebEngineCore
|
||||
Qt::WebEngineCore
|
||||
)
|
||||
else()
|
||||
# QWebEnginePage is in WebEngineWidgets for Qt5
|
||||
target_link_libraries(qgis_core
|
||||
${QT_VERSION_BASE}::WebEngineCore
|
||||
${QT_VERSION_BASE}::WebEngineWidgets
|
||||
Qt::WebEngineCore
|
||||
Qt::WebEngineWidgets
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -2658,9 +2648,9 @@ if (FORCE_STATIC_LIBS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (${QT_VERSION_BASE}SerialPort_FOUND)
|
||||
if (WITH_QTSERIALPORT)
|
||||
target_link_libraries(qgis_core
|
||||
${QT_VERSION_BASE}::SerialPort
|
||||
Qt::SerialPort
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -210,6 +210,7 @@ set(QGIS_GUI_SRCS
|
||||
editorwidgets/qgslistwidgetwrapper.cpp
|
||||
editorwidgets/qgslistconfigdlg.cpp
|
||||
editorwidgets/qgsmultiedittoolbutton.cpp
|
||||
editorwidgets/qgsqmlwidgetwrapper.cpp
|
||||
editorwidgets/qgsrangeconfigdlg.cpp
|
||||
editorwidgets/qgsrangewidgetwrapper.cpp
|
||||
editorwidgets/qgsrangewidgetfactory.cpp
|
||||
@ -1188,6 +1189,7 @@ set(QGIS_GUI_HDRS
|
||||
editorwidgets/qgslistwidgetfactory.h
|
||||
editorwidgets/qgslistwidgetwrapper.h
|
||||
editorwidgets/qgsmultiedittoolbutton.h
|
||||
editorwidgets/qgsqmlwidgetwrapper.h
|
||||
editorwidgets/qgsrangeconfigdlg.h
|
||||
editorwidgets/qgsrangewidgetfactory.h
|
||||
editorwidgets/qgsrangewidgetwrapper.h
|
||||
@ -1619,23 +1621,8 @@ set(QGIS_GUI_PRIVATE_HDRS
|
||||
|
||||
find_package(${QT_VERSION_BASE} COMPONENTS Multimedia MultimediaWidgets Qml QuickWidgets UiTools REQUIRED)
|
||||
|
||||
if(${QT_VERSION_BASE}Qml_FOUND)
|
||||
add_definitions(-DWITH_QML)
|
||||
set(QGIS_GUI_HDRS
|
||||
${QGIS_GUI_HDRS}
|
||||
editorwidgets/qgsqmlwidgetwrapper.h
|
||||
)
|
||||
endif()
|
||||
|
||||
# for installing headers
|
||||
|
||||
if(${QT_VERSION_BASE}Qml_FOUND)
|
||||
set(QGIS_GUI_SRCS
|
||||
${QGIS_GUI_SRCS}
|
||||
editorwidgets/qgsqmlwidgetwrapper.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY QGIS_GUI_HDRS ${QGIS_GUI_HDRS})
|
||||
|
||||
if(ENABLE_MODELTEST)
|
||||
@ -1703,16 +1690,6 @@ target_include_directories(qgis_gui SYSTEM PUBLIC
|
||||
${QSCINTILLA_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_include_directories(qgis_gui SYSTEM PRIVATE
|
||||
${QT_QTUITOOLS_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if (BUILD_WITH_QT6)
|
||||
target_include_directories(qgis_gui SYSTEM PRIVATE
|
||||
${${QT_VERSION_BASE}Svg_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(qgis_gui PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/gui
|
||||
${CMAKE_SOURCE_DIR}/src/gui/actions
|
||||
@ -1829,13 +1806,13 @@ add_dependencies(qgis_gui ui)
|
||||
target_link_libraries(qgis_gui
|
||||
qgis_core
|
||||
qgis_native
|
||||
${QT_VERSION_BASE}::UiTools
|
||||
Qt::UiTools
|
||||
${QWT_LIBRARY}
|
||||
${QSCINTILLA_LIBRARY}
|
||||
${QT_VERSION_BASE}::Qml
|
||||
${QT_VERSION_BASE}::QuickWidgets
|
||||
${QT_VERSION_BASE}::Multimedia
|
||||
${QT_VERSION_BASE}::MultimediaWidgets
|
||||
Qt::Qml
|
||||
Qt::QuickWidgets
|
||||
Qt::Multimedia
|
||||
Qt::MultimediaWidgets
|
||||
)
|
||||
|
||||
if (BUILD_WITH_QT6)
|
||||
@ -1848,13 +1825,13 @@ endif()
|
||||
if (WITH_QTWEBENGINE)
|
||||
find_package(${QT_VERSION_BASE} COMPONENTS WebEngineWidgets REQUIRED)
|
||||
target_link_libraries(qgis_gui
|
||||
${QT_VERSION_BASE}::WebEngineWidgets
|
||||
Qt::WebEngineWidgets
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WITH_QTGAMEPAD)
|
||||
target_link_libraries(qgis_gui
|
||||
${QT_VERSION_BASE}::Gamepad
|
||||
Qt::Gamepad
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -1880,7 +1857,7 @@ if (FORCE_STATIC_LIBS)
|
||||
endif()
|
||||
|
||||
if(ENABLE_MODELTEST)
|
||||
target_link_libraries(qgis_gui ${QT_VERSION_BASE}::Test)
|
||||
target_link_libraries(qgis_gui Qt::Test)
|
||||
endif()
|
||||
|
||||
# We use private headers from core that need this
|
||||
|
Loading…
x
Reference in New Issue
Block a user