From c95fd8dc46416a86a4a306f52d44e962769be499 Mon Sep 17 00:00:00 2001 From: Curve Date: Sun, 3 Dec 2023 00:32:35 +0100 Subject: [PATCH] fix: skip vtk environment on non windows platforms --- Python/CMakeLists.txt | 4 +++- cmake/vtk.cmake | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Python/CMakeLists.txt b/Python/CMakeLists.txt index 7f99f1da..0095acfc 100644 --- a/Python/CMakeLists.txt +++ b/Python/CMakeLists.txt @@ -37,9 +37,11 @@ endif() include("../cmake/vtk.cmake") -if(NOT VTK_DIR) +if(WIN32 AND NOT VTK_DIR) setup_vtk_env(${PROJECT_NAME} vtk_env) set(VTK_DIR "${PROJECT_BINARY_DIR}/vtk_env") +elseif(NOT VTK_DIR) + set(VTK_DIR "${VTK_LIBS}") endif() # -------------------------------------------------------------------------------------------------------- diff --git a/cmake/vtk.cmake b/cmake/vtk.cmake index ecac0715..63ca10b8 100644 --- a/cmake/vtk.cmake +++ b/cmake/vtk.cmake @@ -1,4 +1,10 @@ macro(setup_vtk_env TARGET OUTPUT) + + if (NOT WIN32) + message(STATUS "[ViennaLS] Skipping VTK-Environment setup for ${TARGET} (Only required on Windows)") + return() + endif() + message(STATUS "[ViennaLS] Setting up VTK for ${TARGET}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${PROJECT_BINARY_DIR}/${OUTPUT}>)