Skip to content

Commit

Permalink
Fix QSvgWidget linking for qt6 build
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 18, 2021
1 parent 1925277 commit 2af0a64
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/gui/CMakeLists.txt
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2af0a64

Please sign in to comment.