From 0dfd5f33cbaeb0c68adb0934adccec88b267a0aa Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 26 Apr 2017 11:10:56 +0200 Subject: [PATCH] [CMake] Simplified VTK linkage. --- Applications/ApplicationsLib/CMakeLists.txt | 2 -- Applications/DataExplorer/VtkAct/CMakeLists.txt | 6 +----- MeshLib/CMakeLists.txt | 12 ++++++++---- ProcessLib/CMakeLists.txt | 2 +- ThirdParty/vtkdiff | 2 +- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index 2df4fb662f5..5d4b82fa1d1 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -9,9 +9,7 @@ target_link_libraries(ApplicationsLib MeshGeoToolsLib NumLib ProcessLib - ${VTK_LIBRARIES} ) -ADD_VTK_DEPENDENCY(ApplicationsLib) if(TARGET Eigen) add_dependencies(ApplicationsLib Eigen) diff --git a/Applications/DataExplorer/VtkAct/CMakeLists.txt b/Applications/DataExplorer/VtkAct/CMakeLists.txt index 8b7b655e4a2..ce0c1794f3d 100644 --- a/Applications/DataExplorer/VtkAct/CMakeLists.txt +++ b/Applications/DataExplorer/VtkAct/CMakeLists.txt @@ -24,11 +24,7 @@ add_library(VtkAct ${SOURCES} ${HEADERS}) ADD_VTK_DEPENDENCY(VtkAct) -target_link_libraries( VtkAct - Qt5::Core - ${VTK_LIBRARIES} - logog - ) +target_link_libraries(VtkAct Qt5::Core) set_property(TARGET VtkAct PROPERTY FOLDER "DataExplorer") diff --git a/MeshLib/CMakeLists.txt b/MeshLib/CMakeLists.txt index 0746183e014..7da5c02a33e 100644 --- a/MeshLib/CMakeLists.txt +++ b/MeshLib/CMakeLists.txt @@ -27,12 +27,16 @@ if(OGS_USE_PCH) endif() target_link_libraries(MeshLib - BaseLib - GeoLib - MathLib - ${VTK_LIBRARIES} + PUBLIC BaseLib GeoLib MathLib + INTERFACE vtkIOXML ) +if(OGS_USE_MPI) + target_link_libraries(MeshLib + INTERFACE vtkIOParallelXML vtkParallelMPI + ) +endif() + ADD_VTK_DEPENDENCY(MeshLib) if(TARGET Eigen) diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 79cc2714663..befb3595358 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -58,8 +58,8 @@ add_library(ProcessLib ${SOURCES}) target_link_libraries(ProcessLib MaterialLib MeshGeoToolsLib + MeshLib NumLib # for shape matrices - ${VTK_LIBRARIES} ) ADD_VTK_DEPENDENCY(ProcessLib) diff --git a/ThirdParty/vtkdiff b/ThirdParty/vtkdiff index 7de4b89efad..b75cec4813c 160000 --- a/ThirdParty/vtkdiff +++ b/ThirdParty/vtkdiff @@ -1 +1 @@ -Subproject commit 7de4b89efaddefa4172799ac83dc423676e77485 +Subproject commit b75cec4813c335bcb80f877df1019ddf12a80da1 -- GitLab