Skip to content

Commit

Permalink
fix: missing link when disable librsvg
Browse files Browse the repository at this point in the history
When disable librsvg, we use QtSvg to implement dsvgrenderer. Link
to Qt(5/6)::Svg target.

Log: fix missing link when disable librsvg
  • Loading branch information
asterwyx committed Oct 6, 2023
1 parent da4d71c commit 4453259
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ PRIVATE
Qt${QT_VERSION_MAJOR}::GuiPrivate
Qt${QT_VERSION_MAJOR}::CorePrivate
Qt${QT_VERSION_MAJOR}::DBus
PkgConfig::librsvg
)

if(DTK_DISABLE_LIBRSVG)
find_package(Qt${QT_VERSION_MAJOR}Svg REQUIRED)
target_link_libraries(${LIB_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Svg)
else()
target_link_libraries(${LIB_NAME} PRIVATE PkgConfig::librsvg)
endif()

if(NOT DTK_DISABLE_EX_IMAGE_FORMAT AND EX_IMAGE_FORMAT_LIBS_FOUND)
target_link_libraries(${LIB_NAME} PRIVATE
${libraw_LIBRARIES}
Expand Down Expand Up @@ -79,4 +85,3 @@ set(EnableCov CACHE BOOL OFF)
if (EnableCov)
dtk_setup_code_coverage(${LIB_NAME})
endif()

0 comments on commit 4453259

Please sign in to comment.