Skip to content

Commit

Permalink
Where Python_SITELIB is not defined, fall back to "site-packages"
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Bailey <[email protected]>
  • Loading branch information
danrbailey committed Oct 29, 2024
1 parent 59f8685 commit 4296ab3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,11 @@ if(OPENVDB_BUILD_PYTHON_MODULE OR (OPENVDB_BUILD_NANOVDB AND NANOVDB_BUILD_PYTHO
endif()

if(NOT DEFINED VDB_PYTHON_INSTALL_DIRECTORY)
get_filename_component(Python_PACKAGES_DIR ${Python_SITELIB} NAME)
if(DEFINED Python_SITELIB)
get_filename_component(Python_PACKAGES_DIR ${Python_SITELIB} NAME)
else()
set(Python_PACKAGES_DIR "site-packages")
endif()
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."
Expand Down

0 comments on commit 4296ab3

Please sign in to comment.