vtk/fix_qt5_example_cmake.patch
Atri Bhattacharya 16faa577ab Accepting request 616527 from home:TheBlackCat:branches:science
- Update to version 8.1.1:
  * Fixed thin border around vtkImageResliceMapper
    rendering
  * Fixed vtkImageResliceMapper showing a black
    polygon when slice is out of bounds.
  * Fixed conflict between Process.h and process.h
  * Fixed building VTK 8.1 against 10.13 SDK
    resulting in linker errors when trying to use
    resulting libraries on older SDK
  * Fixed vtkCellPicker::IntersectActorWithLine maybe
    using invalid cell id when picking composite data
- Add fix_qt5_example_cmake.patch
  Fixes use of removed cmake macro in some examples
  See: https://gitlab.kitware.com/vtk/vtk/issues/17336
- Use modern cmake spec file macros
- Run spec cleaner
- Other spec file cleanups
- Support parallel HDF5.
- Drop support for qt4.  Any version of openSUSE with a recent
  enough version of cmake to build the package supports Qt5.
- Drop checks for old versions of openSUSE that have too old
  of a cmake to build.

OBS-URL: https://build.opensuse.org/request/show/616527
OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=119
2018-06-13 14:16:14 +00:00

111 lines
4.5 KiB
Diff

From 54e43bf38f7b8af1fa1bfc934a27f2443fe304d2 Mon Sep 17 00:00:00 2001
From: Todd <toddrme2178@gmail.com>
Date: Mon, 11 Jun 2018 15:40:00 -0400
Subject: [PATCH 1/8] Use `target_link_libraries` instead of `qt5_use_modules`.
diff --git a/Examples/GUI/Qt/Events/CMakeLists.txt b/Examples/GUI/Qt/Events/CMakeLists.txt
--- a/Examples/GUI/Qt/Events/CMakeLists.txt
+++ b/Examples/GUI/Qt/Events/CMakeLists.txt
@@ -43,7 +43,7 @@
add_executable(qtevents
MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs})
- qt5_use_modules(qtevents Core Gui Widgets)
+ target_link_libraries(qtevents Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(qtevents ${VTK_LIBRARIES})
else()
find_package(Qt4 REQUIRED)
diff --git a/Examples/GUI/Qt/FourPaneViewer/CMakeLists.txt b/Examples/GUI/Qt/FourPaneViewer/CMakeLists.txt
--- a/Examples/GUI/Qt/FourPaneViewer/CMakeLists.txt
+++ b/Examples/GUI/Qt/FourPaneViewer/CMakeLists.txt
@@ -46,7 +46,7 @@
# CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped.
add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs})
- qt5_use_modules(QtVTKRenderWindows Core Gui Widgets)
+ target_link_libraries(QtVTKRenderWindows Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(QtVTKRenderWindows ${VTK_LIBRARIES})
else()
find_package(Qt4 REQUIRED)
diff --git a/Examples/GUI/Qt/GraphicsView/CMakeLists.txt b/Examples/GUI/Qt/GraphicsView/CMakeLists.txt
--- a/Examples/GUI/Qt/GraphicsView/CMakeLists.txt
+++ b/Examples/GUI/Qt/GraphicsView/CMakeLists.txt
@@ -61,8 +61,9 @@
add_executable(qtgraphicsview MACOSX_BUNDLE
${Srcs} ${Hdrs} ${MOC_Hdrs} ${QRC_Srcs})
- qt5_use_modules(qtgraphicsview Core Gui Widgets
- WebKit WebKitWidgets OpenGL OpenGLExtensions)
+ target_link_libraries(qtgraphicsview Qt5::Core Qt5::Gui Qt5::Widgets
+ Qt5::WebKit Qt5::WebKitWidgets
+ Qt5::OpenGL Qt5::OpenGLExtensions)
target_link_libraries(qtgraphicsview ${VTK_LIBRARIES})
else()
find_package(Qt4 REQUIRED)
diff --git a/Examples/GUI/Qt/ImageViewer/CMakeLists.txt b/Examples/GUI/Qt/ImageViewer/CMakeLists.txt
--- a/Examples/GUI/Qt/ImageViewer/CMakeLists.txt
+++ b/Examples/GUI/Qt/ImageViewer/CMakeLists.txt
@@ -21,6 +21,6 @@
find_package(Qt5 COMPONENTS Core REQUIRED QUIET)
add_executable(qtimageviewer ${Srcs})
- qt5_use_modules(qtimageviewer Core Gui Widgets)
+ target_link_libraries(qtimageviewer Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(qtimageviewer ${VTK_LIBRARIES})
endif()
diff --git a/Examples/GUI/Qt/SimpleView/CMakeLists.txt b/Examples/GUI/Qt/SimpleView/CMakeLists.txt
--- a/Examples/GUI/Qt/SimpleView/CMakeLists.txt
+++ b/Examples/GUI/Qt/SimpleView/CMakeLists.txt
@@ -64,7 +64,7 @@
add_executable(SimpleView MACOSX_BUNDLE
${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${QRC_Srcs})
- qt5_use_modules(SimpleView Core Gui Widgets)
+ target_link_libraries(SimpleView Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(SimpleView ${VTK_LIBRARIES})
else()
find_package(Qt4 REQUIRED)
diff --git a/Examples/Infovis/Cxx/CustomLinkView/CMakeLists.txt b/Examples/Infovis/Cxx/CustomLinkView/CMakeLists.txt
--- a/Examples/Infovis/Cxx/CustomLinkView/CMakeLists.txt
+++ b/Examples/Infovis/Cxx/CustomLinkView/CMakeLists.txt
@@ -65,7 +65,7 @@
add_executable(CustomLinkView
MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${Rcs_Srcs})
- qt5_use_modules(CustomLinkView Core Gui Widgets)
+ target_link_libraries(CustomLinkView Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(CustomLinkView ${VTK_LIBRARIES})
else()
diff --git a/Examples/Infovis/Cxx/EasyView/CMakeLists.txt b/Examples/Infovis/Cxx/EasyView/CMakeLists.txt
--- a/Examples/Infovis/Cxx/EasyView/CMakeLists.txt
+++ b/Examples/Infovis/Cxx/EasyView/CMakeLists.txt
@@ -74,7 +74,7 @@
add_executable(EasyView
MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${Rcs_Srcs})
- qt5_use_modules(EasyView Core Gui Widgets)
+ target_link_libraries(EasyView Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(EasyView ${VTK_LIBRARIES})
else()
diff --git a/Examples/Infovis/Cxx/StatsView/CMakeLists.txt b/Examples/Infovis/Cxx/StatsView/CMakeLists.txt
--- a/Examples/Infovis/Cxx/StatsView/CMakeLists.txt
+++ b/Examples/Infovis/Cxx/StatsView/CMakeLists.txt
@@ -62,7 +62,7 @@
add_executable(StatsView
MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${Rcs_Srcs})
- qt5_use_modules(StatsView Core Gui Widgets)
+ target_link_libraries(StatsView Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(StatsView ${VTK_LIBRARIES})
else()