From 9c9c8a9f2316fc1bd6f95295186c72affea6e8c8 Mon Sep 17 00:00:00 2001 From: Lars Bilke <larsbilke83@googlemail.com> Date: Mon, 15 Jul 2013 16:40:22 +0200 Subject: [PATCH] CMake fix when VtkVis is not available. --- Utils/SimpleMeshCreation/CMakeLists.txt | 32 ++++++++++++------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Utils/SimpleMeshCreation/CMakeLists.txt b/Utils/SimpleMeshCreation/CMakeLists.txt index 20f6e553e5a..14079e26d39 100644 --- a/Utils/SimpleMeshCreation/CMakeLists.txt +++ b/Utils/SimpleMeshCreation/CMakeLists.txt @@ -1,19 +1,18 @@ +IF(TARGET VtkVis) -INCLUDE_DIRECTORIES( - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/BaseLib - ${CMAKE_SOURCE_DIR}/FileIO - ${CMAKE_SOURCE_DIR}/FileIO/Legacy - ${CMAKE_SOURCE_DIR}/GeoLib - ${CMAKE_SOURCE_DIR}/MathLib - ${CMAKE_SOURCE_DIR}/MeshLib - ${CMAKE_SOURCE_DIR}/Gui/VtkVis -) + INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/BaseLib + ${CMAKE_SOURCE_DIR}/FileIO + ${CMAKE_SOURCE_DIR}/FileIO/Legacy + ${CMAKE_SOURCE_DIR}/GeoLib + ${CMAKE_SOURCE_DIR}/MathLib + ${CMAKE_SOURCE_DIR}/MeshLib + ${CMAKE_SOURCE_DIR}/Gui/VtkVis + ) -INCLUDE( ${VTK_USE_FILE} ) + INCLUDE( ${VTK_USE_FILE} ) -# Create executables -IF(TARGET VtkVis) ADD_EXECUTABLE( generateStructuredQuadMesh generateStructuredQuadMesh.cpp ) SET_TARGET_PROPERTIES( generateStructuredQuadMesh PROPERTIES FOLDER Utils) TARGET_LINK_LIBRARIES( generateStructuredQuadMesh @@ -22,7 +21,7 @@ IF(TARGET VtkVis) GeoLib MathLib VtkVis - vtkRendering + ${VTK_LIBRARIES} ${QT_LIBRARIES} ) @@ -32,10 +31,9 @@ IF(TARGET VtkVis) MeshLib FileIO VtkVis - vtkRendering zlib + ${VTK_LIBRARIES} ${QT_LIBRARIES} ) -ENDIF() # QT4_FOUND - +ENDIF() # VtkVis-target is existing -- GitLab