From 86feeafefb5959159b0e67372699a1541d6765e9 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 26 Apr 2017 12:10:09 +0200 Subject: [PATCH] [CMake,DE] Fix vtk linkage and remove VtkAct. Classes from VtkAct were moved to VtkVis. --- Applications/DataExplorer/CMakeLists.txt | 1 - Applications/DataExplorer/DataExplorer.cmake | 2 -- .../DataExplorer/VtkAct/CMakeLists.txt | 33 ------------------- .../DataExplorer/VtkVis/CMakeLists.txt | 12 +++++-- .../VtkCustomInteractorStyle.cpp | 0 .../VtkCustomInteractorStyle.h | 0 .../{VtkAct => VtkVis}/VtkPickCallback.cpp | 0 .../{VtkAct => VtkVis}/VtkPickCallback.h | 0 8 files changed, 9 insertions(+), 39 deletions(-) delete mode 100644 Applications/DataExplorer/VtkAct/CMakeLists.txt rename Applications/DataExplorer/{VtkAct => VtkVis}/VtkCustomInteractorStyle.cpp (100%) rename Applications/DataExplorer/{VtkAct => VtkVis}/VtkCustomInteractorStyle.h (100%) rename Applications/DataExplorer/{VtkAct => VtkVis}/VtkPickCallback.cpp (100%) rename Applications/DataExplorer/{VtkAct => VtkVis}/VtkPickCallback.h (100%) diff --git a/Applications/DataExplorer/CMakeLists.txt b/Applications/DataExplorer/CMakeLists.txt index 6f21ada93ac..85eacac116f 100644 --- a/Applications/DataExplorer/CMakeLists.txt +++ b/Applications/DataExplorer/CMakeLists.txt @@ -13,5 +13,4 @@ add_subdirectory(DataView/StratView) add_subdirectory(DataView) add_subdirectory(DataView/DiagramView) add_subdirectory(VtkVis) -add_subdirectory(VtkAct) include(DataExplorer.cmake) diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake index 0d12eb31d22..813750fed96 100644 --- a/Applications/DataExplorer/DataExplorer.cmake +++ b/Applications/DataExplorer/DataExplorer.cmake @@ -21,7 +21,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/DataView/StratView ${CMAKE_CURRENT_SOURCE_DIR}/DataView/DiagramView ${CMAKE_CURRENT_SOURCE_DIR}/VtkVis - ${CMAKE_CURRENT_SOURCE_DIR}/VtkAct # Qt generated file includes ${CMAKE_CURRENT_BINARY_DIR} @@ -67,7 +66,6 @@ target_link_libraries(DataExplorer QtDiagramView QtStratView VtkVis - VtkAct Threads::Threads OGSFileConverterLib vtkGUISupportQt diff --git a/Applications/DataExplorer/VtkAct/CMakeLists.txt b/Applications/DataExplorer/VtkAct/CMakeLists.txt deleted file mode 100644 index ce0c1794f3d..00000000000 --- a/Applications/DataExplorer/VtkAct/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -set(SOURCES - VtkPickCallback.cpp - VtkCustomInteractorStyle.cpp -) - -set(HEADERS - VtkPickCallback.h - VtkCustomInteractorStyle.h -) - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../../BaseLib - ${CMAKE_CURRENT_SOURCE_DIR}/../../GeoLib - ${CMAKE_CURRENT_SOURCE_DIR}/../../Applications/FileIO - ${CMAKE_CURRENT_SOURCE_DIR}/../../GeoLib/IO/Gmsh - ${CMAKE_CURRENT_SOURCE_DIR}/../../MeshLib - ${CMAKE_CURRENT_SOURCE_DIR}/../../MathLib - ${CMAKE_CURRENT_SOURCE_DIR}/../VtkVis -) - -add_library(VtkAct ${SOURCES} ${HEADERS}) - -ADD_VTK_DEPENDENCY(VtkAct) - -target_link_libraries(VtkAct Qt5::Core) - -set_property(TARGET VtkAct PROPERTY FOLDER "DataExplorer") - -if(OGS_USE_PCH) - cotire(VtkAct) -endif() diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt index d870cfbb9b6..94fc77c16e0 100644 --- a/Applications/DataExplorer/VtkVis/CMakeLists.txt +++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt @@ -41,6 +41,8 @@ set(SOURCES VtkVisPipelineView.cpp VtkVisPointSetItem.cpp VtkVisTabWidget.cpp + VtkPickCallback.cpp + VtkCustomInteractorStyle.cpp ) set(HEADERS @@ -86,6 +88,8 @@ set(HEADERS VtkVisPipelineView.h VtkVisTabWidget.h VtkConsoleOutputWindow.h + VtkPickCallback.h + VtkCustomInteractorStyle.h ) # Visual Studio folder @@ -106,7 +110,6 @@ include_directories( ${SOURCE_DIR_REL}/GeoLib ${SOURCE_DIR_REL}/MathLib ${SOURCE_DIR_REL}/MeshLib - ${GUI_SOURCE_DIR_REL}/VtkAct ${GUI_SOURCE_DIR_REL}/Base ${GUI_SOURCE_DIR_REL}/DataView ${GUI_SOURCE_DIR_REL}/VtkModules/Qt @@ -129,10 +132,13 @@ ADD_VTK_DEPENDENCY(VtkVis) if(GEOTIFF_FOUND) include_directories(${GEOTIFF_INCLUDE_DIRS}) - target_link_libraries(VtkVis ${GEOTIFF_LIBRARIES}) + target_link_libraries(VtkVis INTERFACE ${GEOTIFF_LIBRARIES}) endif() # GEOTIFF_FOUND -target_link_libraries(VtkVis Qt5::Gui QtDataView VtkAct) +target_link_libraries(VtkVis + PUBLIC Qt5::Gui QtDataView + INTERFACE ${VTK_LIBRARIES} +) set_property(TARGET VtkVis PROPERTY FOLDER "DataExplorer") if(OGS_USE_PCH) diff --git a/Applications/DataExplorer/VtkAct/VtkCustomInteractorStyle.cpp b/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.cpp similarity index 100% rename from Applications/DataExplorer/VtkAct/VtkCustomInteractorStyle.cpp rename to Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.cpp diff --git a/Applications/DataExplorer/VtkAct/VtkCustomInteractorStyle.h b/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.h similarity index 100% rename from Applications/DataExplorer/VtkAct/VtkCustomInteractorStyle.h rename to Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.h diff --git a/Applications/DataExplorer/VtkAct/VtkPickCallback.cpp b/Applications/DataExplorer/VtkVis/VtkPickCallback.cpp similarity index 100% rename from Applications/DataExplorer/VtkAct/VtkPickCallback.cpp rename to Applications/DataExplorer/VtkVis/VtkPickCallback.cpp diff --git a/Applications/DataExplorer/VtkAct/VtkPickCallback.h b/Applications/DataExplorer/VtkVis/VtkPickCallback.h similarity index 100% rename from Applications/DataExplorer/VtkAct/VtkPickCallback.h rename to Applications/DataExplorer/VtkVis/VtkPickCallback.h -- GitLab