Skip to content
Permalink
Browse files
Fix QML cmake for qt 6
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent 8be1752 commit 87e265387ba2baf72486cfbad15150f8303e92e3
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/gui/CMakeLists.txt
@@ -1267,27 +1267,26 @@ set(QGIS_GUI_PRIVATE_HDRS
)

if (WITH_QT6)
# No QML for now
find_package(Qt6 COMPONENTS Qml QuickWidgets REQUIRED)
else()
find_package(Qt5 COMPONENTS Qml QuickWidgets REQUIRED)
endif()

if(Qt5Qml_FOUND)
if(${QT_VERSION_BASE}Qml_FOUND)
add_definitions(-DWITH_QML)
set(QGIS_GUI_HDRS
${QGIS_GUI_HDRS}
editorwidgets/qgsqmlwidgetwrapper.h
)
endif()

# for installing headers
endif()

if(Qt5Qml_FOUND)
# for installing headers

if(${QT_VERSION_BASE}Qml_FOUND)
set(QGIS_GUI_SRCS
${QGIS_GUI_SRCS}
editorwidgets/qgsqmlwidgetwrapper.cpp
)
endif()
endif()

set_property(GLOBAL PROPERTY QGIS_GUI_HDRS ${QGIS_GUI_HDRS})

0 comments on commit 87e2653

Please sign in to comment.