Skip to content
Permalink
Browse files
Fix QSvgWidget linking for qt6 build
  • Loading branch information
nyalldawson committed Aug 18, 2021
1 parent 1925277 commit 2af0a6409ff1d26b08a0b32f385c4c6a3861ed53
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/gui/CMakeLists.txt
@@ -1407,6 +1407,12 @@ target_include_directories(qgis_gui SYSTEM PRIVATE
${QT_QTUITOOLS_INCLUDE_DIR}
)

if (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/attributeformconfig
@@ -1509,6 +1515,13 @@ target_link_libraries(qgis_gui
${QT_VERSION_BASE}::QuickWidgets
)

if (WITH_QT6)
find_package(Qt6 COMPONENTS SvgWidgets REQUIRED)
target_link_libraries(qgis_gui
Qt6::SvgWidgets
)
endif()

if (FORCE_STATIC_LIBS)
target_link_libraries(qgis_gui
provider_wms_gui_a

0 comments on commit 2af0a64

Please sign in to comment.