Skip to content

Commit

Permalink
Add dependency on QtSvg for project cafUserInterface
Browse files Browse the repository at this point in the history
The project cafUserInterface requires the library QtSvg because of the
use of QSvgRenderer in cafUiIconFactory.cpp. The library has to be
linked into the final executable. The target introdicing the dependency
should also be the one specifying it.

This allows us to remove the dependency from targets that doesn't
directly use QtSvg at all.

Closes #10955
  • Loading branch information
marthinsen authored and magnesj committed Dec 16, 2023
1 parent 9701866 commit 1f1904d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ set(QRC_FILES ${QRC_FILES} textedit.qrc)
find_package(
Qt5
COMPONENTS
REQUIRED Core Gui Widgets OpenGL Svg
REQUIRED Core Gui Widgets OpenGL
)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL Qt5::Svg)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
qt5_add_resources(QRC_FILES_CPP ${QRC_FILES})

Expand Down
4 changes: 2 additions & 2 deletions Fwk/AppFwk/cafTests/cafTestCvfApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ set(QRC_FILES textedit.qrc)
find_package(
Qt5
COMPONENTS
REQUIRED Core Gui Widgets OpenGL Svg
REQUIRED Core Gui Widgets OpenGL
)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL Qt5::Svg)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
qt5_add_resources(QRC_FILES_CPP ${QRC_FILES})

Expand Down
4 changes: 2 additions & 2 deletions Fwk/AppFwk/cafUserInterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ set(MOC_HEADER_FILES
find_package(
Qt5
COMPONENTS
REQUIRED Core Gui Widgets
REQUIRED Core Gui Widgets Svg
)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Svg)
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})

set(PROJECT_FILES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ project(cafUserInterface_UnitTests)
find_package(
Qt5
COMPONENTS
REQUIRED Core Gui Widgets Svg
REQUIRED Core Gui Widgets
)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL Qt5::Svg)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
)
Expand Down

0 comments on commit 1f1904d

Please sign in to comment.