From a9ed487c011db5d36598e0de2eb7460fdbb9cf21 Mon Sep 17 00:00:00 2001 From: Cary Phillips Date: Fri, 9 Feb 2024 09:29:35 -0800 Subject: [PATCH] Update src/wrappers/python/CMakeLists.txt Co-authored-by: Jean-Christophe Morin <38703886+JeanChristopheMorinPerso@users.noreply.github.com> Signed-off-by: Cary Phillips --- src/wrappers/python/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wrappers/python/CMakeLists.txt b/src/wrappers/python/CMakeLists.txt index 14f0081091..471619b683 100644 --- a/src/wrappers/python/CMakeLists.txt +++ b/src/wrappers/python/CMakeLists.txt @@ -23,8 +23,13 @@ set_target_properties (PyOpenEXR PROPERTIES OUTPUT_NAME "OpenEXR") configure_file(Imath.py ${CMAKE_CURRENT_BINARY_DIR}/Imath.py COPYONLY) -install(TARGETS PyOpenEXR DESTINATION python/OpenEXR) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Imath.py DESTINATION python/OpenEXR) +set(PYTHON_INSTALL_DIR "python/OpenEXR") +if(SKBUILD) + set(PYTHON_INSTALL_DIR ${SKBUILD_PLATLIB_DIR}) +endif() + +install(TARGETS PyOpenEXR DESTINATION ${PYTHON_INSTALL_DIR}) +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Imath.py DESTINATION ${PYTHON_INSTALL_DIR}) if(BUILD_TESTING AND OPENEXR_TEST_PYTHON)