Skip to content

Commit

Permalink
Add initial pip install implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Cong <[email protected]>
  • Loading branch information
matthewdcong committed Oct 29, 2024
1 parent 251b127 commit 5e4bb9f
Show file tree
Hide file tree
Showing 18 changed files with 197 additions and 56 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ if(OPENVDB_INSTALL_CMAKE_MODULES)
cmake/OpenVDBMayaSetup.cmake
cmake/OpenVDBUtils.cmake
)
install(FILES ${OPENVDB_CMAKE_MODULES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVDB)
if(SKBUILD)
install(FILES ${OPENVDB_CMAKE_MODULES} DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}/cmake/OpenVDB)
else()
install(FILES ${OPENVDB_CMAKE_MODULES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVDB)
endif()
endif()

# Configure component dependencies by loading the Houdini/Maya setup
Expand Down
6 changes: 5 additions & 1 deletion nanovdb/nanovdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ if(TARGET Threads::Threads)
target_link_libraries(nanovdb INTERFACE Threads::Threads)
endif()

set(NANOVDB_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/nanovdb)
if(SKBUILD)
set(NANOVDB_INSTALL_INCLUDE_DIR nanovdb/${CMAKE_INSTALL_INCLUDEDIR}/nanovdb)
else()
set(NANOVDB_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/nanovdb)
endif()
set(NANOVDB_INSTALL_CUDA_DIR ${NANOVDB_INSTALL_INCLUDE_DIR}/cuda)
set(NANOVDB_INSTALL_IO_DIR ${NANOVDB_INSTALL_INCLUDE_DIR}/io)
set(NANOVDB_INSTALL_MATH_DIR ${NANOVDB_INSTALL_INCLUDE_DIR}/math)
Expand Down
12 changes: 9 additions & 3 deletions nanovdb/nanovdb/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,28 @@ endif()

# -----------------------------------------------------------------------------

if(SKBUILD)
set(NANOVDB_INSTALL_BINDIR nanovdb/${CMAKE_INSTALL_BINDIR})
else()
set(NANOVDB_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR})
endif()

if(NOT NANOVDB_USE_OPENVDB)
message(WARNING " - OpenVDB required to build nanovdb_convert. Skipping.")
else()
add_executable(nanovdb_convert convert/nanovdb_convert.cc)
target_link_libraries(nanovdb_convert PRIVATE nanovdb)
install(TARGETS nanovdb_convert RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS nanovdb_convert RUNTIME DESTINATION ${NANOVDB_INSTALL_BINDIR})
endif()

# -----------------------------------------------------------------------------
# nanovdb_print
add_executable(nanovdb_print print/nanovdb_print.cc)
target_link_libraries(nanovdb_print PRIVATE nanovdb)
install(TARGETS nanovdb_print RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS nanovdb_print RUNTIME DESTINATION ${NANOVDB_INSTALL_BINDIR})

# -----------------------------------------------------------------------------
# nanovdb_validate
add_executable(nanovdb_validate validate/nanovdb_validate.cc)
target_link_libraries(nanovdb_validate PRIVATE nanovdb)
install(TARGETS nanovdb_validate RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS nanovdb_validate RUNTIME DESTINATION ${NANOVDB_INSTALL_BINDIR})
6 changes: 5 additions & 1 deletion nanovdb/nanovdb/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ function(NANOVDB_EXAMPLE)
target_include_directories(${EXAMPLE_NAME} PUBLIC ex_util)
target_link_libraries(${EXAMPLE_NAME} PRIVATE nanovdb)

install(TARGETS ${EXAMPLE_NAME} DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
if(SKBUILD)
install(TARGETS ${EXAMPLE_NAME} DESTINATION nanovdb/${CMAKE_INSTALL_DOCDIR}/examples)
else()
install(TARGETS ${EXAMPLE_NAME} DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
endif()
endfunction()

# -----------------------------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion nanovdb/nanovdb/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ target_include_directories(nanovdb_python PRIVATE ${CUDA_INCLUDE_DIRECTORY})
target_link_libraries(nanovdb_python PRIVATE nanovdb ${CUDA_LIBRARIES} ${NANOVDB_BLOSC} ${NANOVDB_ZLIB} ${NANOVDB_OPENVDB} ${NANOVDB_TBB})
target_compile_definitions(nanovdb_python PRIVATE ${NANOVDB_USE_CUDA_FLAG} ${NANOVDB_USE_BLOSC_FLAG} ${NANOVDB_USE_ZLIB_FLAG} ${NANOVDB_USE_OPENVDB_FLAG} ${NANOVDB_USE_TBB_FLAG})
set_target_properties(nanovdb_python PROPERTIES OUTPUT_NAME "nanovdb")
install(TARGETS nanovdb_python DESTINATION ${VDB_PYTHON_INSTALL_DIRECTORY})
if(SKBUILD)
set_target_properties(nanovdb_python PROPERTIES INSTALL_RPATH "$ORIGIN/../../openvdb/lib")
install(TARGETS nanovdb_python DESTINATION nanovdb/${CMAKE_INSTALL_LIBDIR})
install(FILES __init__.py DESTINATION nanovdb)
else()
install(TARGETS nanovdb_python DESTINATION ${VDB_PYTHON_INSTALL_DIRECTORY})
endif()

# pytest
if(NANOVDB_BUILD_PYTHON_UNITTESTS)
Expand Down
7 changes: 7 additions & 0 deletions nanovdb/nanovdb/python/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import sys
if sys.platform == "win32":
import os
openvdb_dll_directory = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, 'openvdb', 'lib')
os.add_dll_directory(directory)

from .lib.nanovdb import *
77 changes: 53 additions & 24 deletions openvdb/openvdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -718,29 +718,58 @@ endif()

# Installation

if(OPENVDB_CORE_STATIC)
install(TARGETS openvdb_static
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
if(SKBUILD)
if(OPENVDB_CORE_STATIC)
install(TARGETS openvdb_static
RUNTIME DESTINATION openvdb/${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}
)
endif()

if(OPENVDB_CORE_SHARED)
install(TARGETS openvdb_shared
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
if(OPENVDB_CORE_SHARED)
install(TARGETS openvdb_shared
RUNTIME DESTINATION openvdb/${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}
)
endif()

install(FILES ${OPENVDB_LIBRARY_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openvdb/version.h DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb)
install(FILES ${OPENVDB_LIBRARY_IO_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb/io)
install(FILES ${OPENVDB_LIBRARY_MATH_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb/math)
install(FILES ${OPENVDB_LIBRARY_POINTS_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb/points)
install(FILES ${OPENVDB_LIBRARY_POINTS_IMPL_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb/points/impl)
install(FILES ${OPENVDB_LIBRARY_TOOLS_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb/tools)
install(FILES ${OPENVDB_LIBRARY_TREE_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb/tree)
install(FILES ${OPENVDB_LIBRARY_UTIL_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb/util)
install(FILES ${OPENVDB_LIBRARY_THREAD_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb/thread)
else()
if(OPENVDB_CORE_STATIC)
install(TARGETS openvdb_static
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()

install(FILES ${OPENVDB_LIBRARY_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openvdb/version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb)
install(FILES ${OPENVDB_LIBRARY_IO_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/io)
install(FILES ${OPENVDB_LIBRARY_MATH_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/math)
install(FILES ${OPENVDB_LIBRARY_POINTS_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/points)
install(FILES ${OPENVDB_LIBRARY_POINTS_IMPL_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/points/impl)
install(FILES ${OPENVDB_LIBRARY_TOOLS_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/tools)
install(FILES ${OPENVDB_LIBRARY_TREE_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/tree)
install(FILES ${OPENVDB_LIBRARY_UTIL_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/util)
install(FILES ${OPENVDB_LIBRARY_THREAD_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/thread)
if(OPENVDB_CORE_SHARED)
install(TARGETS openvdb_shared
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()

install(FILES ${OPENVDB_LIBRARY_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openvdb/version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb)
install(FILES ${OPENVDB_LIBRARY_IO_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/io)
install(FILES ${OPENVDB_LIBRARY_MATH_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/math)
install(FILES ${OPENVDB_LIBRARY_POINTS_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/points)
install(FILES ${OPENVDB_LIBRARY_POINTS_IMPL_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/points/impl)
install(FILES ${OPENVDB_LIBRARY_TOOLS_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/tools)
install(FILES ${OPENVDB_LIBRARY_TREE_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/tree)
install(FILES ${OPENVDB_LIBRARY_UTIL_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/util)
install(FILES ${OPENVDB_LIBRARY_THREAD_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/thread)
endif()
9 changes: 7 additions & 2 deletions openvdb/openvdb/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ if(USE_AX)
target_compile_definitions(openvdb_python PUBLIC "-DPY_OPENVDB_USE_AX")
endif()
set_target_properties(openvdb_python PROPERTIES OUTPUT_NAME "openvdb")

install(TARGETS openvdb_python DESTINATION ${VDB_PYTHON_INSTALL_DIRECTORY})
if(SKBUILD)
set_target_properties(openvdb_python PROPERTIES INSTALL_RPATH "$ORIGIN")
install(TARGETS openvdb_python DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR})
install(FILES __init__.py DESTINATION openvdb)
else()
install(TARGETS openvdb_python DESTINATION ${VDB_PYTHON_INSTALL_DIRECTORY})
endif()

# pytest
if(OPENVDB_BUILD_PYTHON_UNITTESTS)
Expand Down
1 change: 1 addition & 0 deletions openvdb/openvdb/python/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .lib.openvdb import *
57 changes: 40 additions & 17 deletions openvdb_ax/openvdb_ax/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -354,23 +354,46 @@ if(OPENVDB_AX_SHARED)
endif()
endif()

install(FILES ax.h Exceptions.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/)
install(FILES ${OPENVDB_AX_AST_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/ast)
install(FILES ${OPENVDB_AX_CODEGEN_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/codegen)
install(FILES ${OPENVDB_AX_COMPILER_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/compiler)
if(SKBUILD)
install(FILES ax.h Exceptions.h DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/)
install(FILES ${OPENVDB_AX_AST_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/ast)
install(FILES ${OPENVDB_AX_CODEGEN_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/codegen)
install(FILES ${OPENVDB_AX_COMPILER_INCLUDE_FILES} DESTINATION openvdb/${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/compiler)

if(OPENVDB_AX_STATIC)
install(TARGETS openvdb_ax_static
RUNTIME DESTINATION openvdb/${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}
)
endif()

if(OPENVDB_AX_STATIC)
install(TARGETS openvdb_ax_static
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
if(OPENVDB_AX_SHARED)
install(TARGETS openvdb_ax_shared
RUNTIME DESTINATION openvdb/${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION openvdb/${CMAKE_INSTALL_LIBDIR}
)
endif()
else()
install(FILES ax.h Exceptions.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/)
install(FILES ${OPENVDB_AX_AST_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/ast)
install(FILES ${OPENVDB_AX_CODEGEN_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/codegen)
install(FILES ${OPENVDB_AX_COMPILER_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb_ax/compiler)

if(OPENVDB_AX_STATIC)
install(TARGETS openvdb_ax_static
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()

if(OPENVDB_AX_SHARED)
install(TARGETS openvdb_ax_shared
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
if(OPENVDB_AX_SHARED)
install(TARGETS openvdb_ax_shared
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
endif()
6 changes: 6 additions & 0 deletions openvdb_cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ endif()

##########################################################################

if(SKBUILD)
set(OPENVDB_INSTALL_BINDIR openvdb/${CMAKE_INSTALL_BINDIR})
else()
set(OPENVDB_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR})
endif()

if (OPENVDB_BUILD_VDB_PRINT)
add_subdirectory(vdb_print)
endif()
Expand Down
2 changes: 1 addition & 1 deletion openvdb_cmd/vdb_ax/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ set(SOURCE_FILES main.cc)
add_executable(vdb_ax ${SOURCE_FILES})
target_link_libraries(vdb_ax ${OPENVDB_BINARIES_DEPENDENT_LIBS})

install(TARGETS vdb_ax RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS vdb_ax RUNTIME DESTINATION ${OPENVDB_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion openvdb_cmd/vdb_lod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ set(SOURCE_FILES main.cc)
add_executable(vdb_lod ${SOURCE_FILES})
target_link_libraries(vdb_lod ${OPENVDB_BINARIES_DEPENDENT_LIBS})

install(TARGETS vdb_lod RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS vdb_lod RUNTIME DESTINATION ${OPENVDB_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion openvdb_cmd/vdb_print/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ set(SOURCE_FILES main.cc)
add_executable(vdb_print ${SOURCE_FILES})
target_link_libraries(vdb_print ${OPENVDB_BINARIES_DEPENDENT_LIBS})

install(TARGETS vdb_print RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS vdb_print RUNTIME DESTINATION ${OPENVDB_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion openvdb_cmd/vdb_render/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ target_link_libraries(vdb_render
$<TARGET_NAME_IF_EXISTS:PNG::PNG>
)

install(TARGETS vdb_render RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS vdb_render RUNTIME DESTINATION ${OPENVDB_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion openvdb_cmd/vdb_tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ target_include_directories(vdb_tool_common INTERFACE "${Boost_INCLUDE_DIRS}" "${
add_executable(vdb_tool src/main.cpp)
target_include_directories(vdb_tool PRIVATE vdb_tool_common)
target_link_libraries(vdb_tool PRIVATE vdb_tool_common)
install(TARGETS vdb_tool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS vdb_tool RUNTIME DESTINATION ${OPENVDB_INSTALL_BINDIR})


# unit test
Expand Down
2 changes: 1 addition & 1 deletion openvdb_cmd/vdb_view/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ endif()

target_compile_definitions(vdb_view PRIVATE -DGL_GLEXT_PROTOTYPES=1)

install(TARGETS vdb_view RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS vdb_view RUNTIME DESTINATION ${OPENVDB_INSTALL_BINDIR})
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[build-system]
requires = ["scikit_build_core", "nanobind"]
build-backend = "scikit_build_core.build"

[project]
name = "openvdb"
version = "11.0.1"
description= "Python bindings for OpenVDB: sparse volume data structure and tools."
dependencies = [
"numpy",
]
authors = [
{ name = "OpenVDB Developer Team", email = "[email protected]" },
]
requires-python = ">=3.8"
classifiers = [
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[project.urls]
homepage = "https://www.openvdb.org/"
documentation = "https://www.openvdb.org/documentation"
forum = "https://github.com/AcademySoftwareFoundation/openvdb/discussions"
repository = "https://github.com/AcademySoftwareFoundation/openvdb"
slack = "https://slack.aswf.io/"

[tool.scikit-build]
wheel.packages = []

[tool.scikit-build.cmake.define]
OPENVDB_CORE_STATIC="OFF"
USE_EXPLICIT_INSTANTIATION="OFF"
DISABLE_DEPENDENCY_VERSION_CHECKS="ON"
OPENVDB_USE_DELAYED_LOADING="OFF"
OPENVDB_BUILD_PYTHON_MODULE="ON"
USE_NUMPY="ON"

USE_NANOVDB="ON"
NANOVDB_USE_CUDA="ON"
NANOVDB_BUILD_PYTHON_MODULE="ON"
NANOVDB_USE_OPENVDB="ON"

0 comments on commit 5e4bb9f

Please sign in to comment.