summaryrefslogtreecommitdiff
path: root/misc/py-openvdb/files/patch-CMakeLists.txt
blob: 1ad94f363c207c14dfd23068288c259bbc892d11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- CMakeLists.txt.orig	2025-04-03 05:22:14 UTC
+++ CMakeLists.txt
@@ -12,6 +12,16 @@ include(GNUInstallDirs)
 
 include(GNUInstallDirs)
 
+set(CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake/OpenVDB" ${CMAKE_MODULE_PATH})
+find_package(OpenVDB REQUIRED)
+find_package(Python ${FREEBSD_PYTHON_VER} EXACT REQUIRED COMPONENTS Development Interpreter)
+find_package(nanobind REQUIRED)
+set(Python_PACKAGES_DIR "site-packages")
+set(VDB_PYTHON_INSTALL_DIRECTORY
+  ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/${Python_PACKAGES_DIR}
+  CACHE STRING "The directory to install the openvdb and nanovdb Python modules."
+)
+
 ###### OpenVDB Python Options
 
 option(USE_NUMPY "Build the python library with numpy support." OFF)