Skip to content

Commit

Permalink
chore(deps): bump viennacore
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Jul 16, 2024
1 parent 337f8b2 commit 8c451ec
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ include(cmake/vtk.cmake)

CPMAddPackage(
NAME ViennaCore
GIT_TAG v1.0.0
VERSION 1.1.0
GIT_REPOSITORY "https://github.com/ViennaTools/ViennaCore"
OPTIONS "VIENNACORE_FORMAT_EXCLUDE docs/"
EXCLUDE_FROM_ALL ${VIENNALS_BUILD_PYTHON})
Expand Down
18 changes: 0 additions & 18 deletions cmake/vtk.cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
macro(setup_vtk_env TARGET OUTPUT)
message(STATUS "[ViennaLS] Setting up VTK-Environment for ${TARGET}")

if(NOT TARGET vtksys)
message(WARNING "[ViennaLS] Could not find VTK-Target")
return()
endif()

# We expect all of the VTK binaries to be present in the same directory to which "vtksys" is
# built. This is currently the case, and has been the case for prior vtk versions - However we
# should keep an eye on this.

add_custom_command(
TARGET ${TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory $<TARGET_FILE_DIR:vtksys> ${OUTPUT})
endmacro()

# --------------------------------------------------------------------------------------------------------
# This is one of the most, if not the most, *cursed* workaround I've ever deployed.
# In an effort to reduce build times and to deduplicate VTK library files,
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_custom_target(ViennaLS_Examples ALL)

if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${PROJECT_BINARY_DIR}/examples>)
setup_vtk_env(ViennaLS_Examples ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
viennacore_setup_vtk_env(ViennaLS_Examples ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()

viennacore_add_subdirs(${CMAKE_CURRENT_LIST_DIR})
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ target_compile_definitions(viennals3d PRIVATE -DVIENNALS_PYTHON_DIMENSION=3
set(VIENNALS_LIB_FOLDER ${VIENNALS_LIBRARY_OUTPUT_DIR}/viennals.libs)

# Not required for both targets, one will suffice
setup_vtk_env(viennals2d ${VIENNALS_LIB_FOLDER})
viennacore_setup_vtk_env(viennals2d ${VIENNALS_LIB_FOLDER})

install(
DIRECTORY ${VIENNALS_LIB_FOLDER}
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_custom_target(ViennaLS_Tests ALL)

if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${PROJECT_BINARY_DIR}/tests>)
setup_vtk_env(ViennaLS_Tests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
viennacore_setup_vtk_env(ViennaLS_Tests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()

viennacore_add_subdirs(${CMAKE_CURRENT_LIST_DIR})

0 comments on commit 8c451ec

Please sign in to comment.