Skip to content

Commit 33cc823

Browse files
cary-ilmCopilot
andauthored
Update src/pybind11/PyBindImath/CMakeLists.txt
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Cary Phillips <cary@ilm.com>
1 parent 6cd37f9 commit 33cc823

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/pybind11/PyBindImath/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,12 @@ if (IMATH_INSTALL)
138138
get_filename_component(Python3_PREFIX "${Python3_PREFIX}" DIRECTORY)
139139
endif()
140140

141+
# Ensure Python3_SITEARCH is absolute before computing relative path
142+
file(REAL_PATH "${Python3_SITEARCH}" Python3_SITEARCH_ABS)
143+
141144
file(RELATIVE_PATH PYTHON_INSTALL_DIR
142145
"${Python3_PREFIX}"
143-
"${Python3_SITEARCH}")
146+
"${Python3_SITEARCH_ABS}")
144147

145148
message(STATUS "installing ${PYBINDIMATH_MODULE_NAME} to ${PYTHON_INSTALL_DIR}")
146149

0 commit comments

Comments
 (0)