Skip to content

Commit

Permalink
fix: skip vtk environment on non windows platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Dec 2, 2023
1 parent 2aa3da1 commit c95fd8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

# --------------------------------------------------------------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions cmake/vtk.cmake
Original file line number Diff line number Diff line change
@@ -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}>)

Expand Down

0 comments on commit c95fd8d

Please sign in to comment.