Commit 9a23b102 authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'findopenvdb-fixes'

aabbd22a ci: update Linux images to one containing OpenVDB
e0ded718 ci: turn off OpenVDB on CI jobs without the dependency
214004a1 ci/docker: install OpenVDB into the Linux CI images
58a62f81 vtkInstallCMakePackageHelpers: add helpers for FindOpenVDB
97d42a62 IO/OpenVDB: clean up the cache variables
9e2801a7 IO/OpenVDB: use `vtk_module_find_package`
dc9b5333 IO/OpenVDB: remove from the StandAlone group
5af2ebca

 cmake: remove the VTK_ENABLE_OPENVDB flag
...

Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Andrew Bauer's avatarAndrew Bauer <bauer.andrew.c@gmail.com>
Merge-request: !8334
parents 131cb6cb aabbd22a
# Modules which require software not in the CI image.
set(VTK_MODULE_ENABLE_VTK_RenderingRayTracing NO CACHE STRING "") # ospray
# FindOpenVDB is not installed.
# https://bugzilla.redhat.com/show_bug.cgi?id=1997321
set(VTK_MODULE_ENABLE_VTK_IOOpenVDB NO CACHE STRING "") # openvdb
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "offscreen")
set(VTK_USE_X OFF CACHE BOOL "")
......
......@@ -10,6 +10,7 @@ set(VTK_MODULE_ENABLE_VTK_IOGDAL NO CACHE STRING "") # ffmpeg
set(VTK_MODULE_ENABLE_VTK_IOLAS NO CACHE STRING "") # liblas, boost
set(VTK_MODULE_ENABLE_VTK_IOMySQL NO CACHE STRING "") # mysql
set(VTK_MODULE_ENABLE_VTK_IOODBC NO CACHE STRING "") # odbc
set(VTK_MODULE_ENABLE_VTK_IOOpenVDB NO CACHE STRING "") # OpenVDB
set(VTK_MODULE_ENABLE_VTK_IOPDAL NO CACHE STRING "") # pdal
set(VTK_MODULE_ENABLE_VTK_IOPostgreSQL NO CACHE STRING "") # postgresql
set(VTK_MODULE_ENABLE_VTK_InfovisBoost NO CACHE STRING "") # boost
......
......@@ -41,6 +41,7 @@ set(VTK_MODULE_ENABLE_VTK_IOGDAL NO CACHE STRING "") # GDAL
set(VTK_MODULE_ENABLE_VTK_IOLAS NO CACHE STRING "") # liblas
set(VTK_MODULE_ENABLE_VTK_IOMySQL NO CACHE STRING "") # MariaDB
set(VTK_MODULE_ENABLE_VTK_IOODBC NO CACHE STRING "") # odbc
set(VTK_MODULE_ENABLE_VTK_IOOpenVDB NO CACHE STRING "") # OpenVDB
set(VTK_MODULE_ENABLE_VTK_IOPDAL NO CACHE STRING "") # PDAL
set(VTK_MODULE_ENABLE_VTK_IOPostgreSQL NO CACHE STRING "") # PostgreSQL
set(VTK_MODULE_ENABLE_VTK_InfovisBoost NO CACHE STRING "") # Boost
......
......@@ -10,6 +10,7 @@ set(VTK_MODULE_ENABLE_VTK_IOGDAL NO CACHE STRING "") # ffmpeg
set(VTK_MODULE_ENABLE_VTK_IOLAS NO CACHE STRING "") # liblas, boost
set(VTK_MODULE_ENABLE_VTK_IOMySQL NO CACHE STRING "") # mysql
set(VTK_MODULE_ENABLE_VTK_IOODBC NO CACHE STRING "") # odbc
set(VTK_MODULE_ENABLE_VTK_IOOpenVDB NO CACHE STRING "") # OpenVDB
set(VTK_MODULE_ENABLE_VTK_IOPDAL NO CACHE STRING "") # pdal
set(VTK_MODULE_ENABLE_VTK_IOPostgreSQL NO CACHE STRING "") # postgresql
set(VTK_MODULE_ENABLE_VTK_InfovisBoost NO CACHE STRING "") # boost
......
......@@ -37,7 +37,7 @@ dnf install -y --setopt=install_weak_deps=False \
boost-devel tbb-devel postgresql-server-devel libpq-devel mariadb-devel \
libiodbc-devel PDAL-devel liblas-devel openslide-devel libarchive-devel \
freeglut-devel sqlite-devel PEGTL-devel cgnslib-devel proj-devel \
wkhtmltopdf cli11-devel fmt-devel
wkhtmltopdf cli11-devel fmt-devel openvdb-devel
# Python dependencies
dnf install -y --setopt=install_weak_deps=False \
......
......@@ -43,7 +43,7 @@
.fedora33:
extends: .linux
image: "kitware/vtk:ci-fedora33-20210812"
image: "kitware/vtk:ci-fedora33-20210824"
.fedora_mpich_addon:
variables:
......
......@@ -60,6 +60,16 @@ foreach (_vtk_package IN LISTS _vtk_packages)
${${_vtk_package}_find_package_vars})
endforeach ()
if ("OpenVDB" IN_LIST _vtk_packages)
# FIXME: FindOpenVDB is provided by upstream and needs module path help to
# work properly.
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1160
string(APPEND vtk_find_package_code
"list(INSERT CMAKE_MODULE_PATH 0
\"${OpenVDB_CMAKE_PATH}\")
")
endif ()
file(GENERATE
OUTPUT "${vtk_cmake_build_dir}/vtk-find-package-helpers.cmake"
CONTENT "${vtk_find_package_code}")
......@@ -33,9 +33,6 @@ endif()
include(vtkCMakeBackports)
option(VTK_ENABLE_OPENVDB "Enable the OpenVDB Writer" OFF)
mark_as_advanced(VTK_ENABLE_OPENVDB)
option(VTK_WHEEL_BUILD "Build in such a way that Python wheels are supported" OFF)
mark_as_advanced(VTK_WHEEL_BUILD)
if (VTK_WHEEL_BUILD)
......
# Resolve the OpenVDB external dependency
find_path(OPENVDB_CMAKE_PATH
FindOpenVDB.cmake
DOC "Path to OpenVDB CMake files"
)
find_path(OpenVDB_CMAKE_PATH
NAMES FindOpenVDB.cmake
DOC "Path to OpenVDB CMake files")
mark_as_advanced(OpenVDB_CMAKE_PATH)
list(APPEND CMAKE_MODULE_PATH "${OPENVDB_CMAKE_PATH}")
find_package(OpenVDB REQUIRED)
list(INSERT CMAKE_MODULE_PATH 0
"${OpenVDB_CMAKE_PATH}")
vtk_module_find_package(PACKAGE OpenVDB)
set(classes
vtkOpenVDBWriter)
......
add_subdirectory(Python)
if (VTK_WRAP_PYTHON)
add_subdirectory(Python)
endif ()
if (VTK_WRAP_PYTHON)
find_program(OpenVDB_VDB_PRINT
vdb_print vdb_print.exe
HINTS "${OpenVDB_CMAKE_PATH}/../../../bin"
DOC "vdb_print executable from the OpenVDB library"
)
mark_as_advanced(OpenVDB_VDB_PRINT)
find_program(OpenVDB_VDB_PRINT
vdb_print vdb_print.exe
HINTS "${OPENVDB_CMAKE_PATH}/../../../bin"
DOC "vdb_print executable from the OpenVDB library"
)
if (OpenVDB_VDB_PRINT)
set(SaveOpenVDBFile_ARGS "--VDB_PRINT_EXE" "${OpenVDB_VDB_PRINT}")
set(PY_TESTS
NO_VALID NO_RT
SaveOpenVDBFile.py
)
if (OpenVDB_VDB_PRINT)
set(SaveOpenVDBFile_ARGS "--VDB_PRINT_EXE" "${OpenVDB_VDB_PRINT}")
vtk_add_test_python(
${PY_TESTS}
)
endif()
set(PY_TESTS
NO_VALID NO_RT
SaveOpenVDBFile.py
)
endif(VTK_WRAP_PYTHON)
vtk_add_test_python(
${PY_TESTS}
)
endif()
......@@ -2,10 +2,6 @@ NAME
VTK::IOOpenVDB
LIBRARY_NAME
vtkIOOpenVDB
CONDITION
VTK_ENABLE_OPENVDB
GROUPS
StandAlone
KIT
VTK::IO
DEPENDS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment