From 2a33b58dd52ff59f7df8b3bc14043a210cdbc9bd Mon Sep 17 00:00:00 2001 From: Stephan Steinbach <61017+ssteinbach@users.noreply.github.com> Date: Tue, 9 Feb 2021 17:09:50 -0800 Subject: [PATCH] Revert the location of shared libraries (#883) - in the python build, shared libraries need to go along with the python libraries because of python security policies. - Also removes an unnecsary reference to python cmake variables in the C++ only branch. Co-authored-by: ssteinbach --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74715a401..8cc6d8ae5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,12 +76,16 @@ if(OTIO_PYTHON_INSTALL) # CMAKE_INSTALL_PREFIX was set, so install the python components there set(OTIO_RESOLVED_PYTHON_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/python") set(OTIO_RESOLVED_CXX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}") - set(OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") + + # In order to not require setting $PYTHONPATH to point at the .so, + # the shared libraries are installed into the python library + # location. + set(OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR "${OTIO_PYTHON_INSTALL_DIR}/opentimelineio") message(INFO, "OTIO Defaulting Python install to ${OTIO_RESOLVED_PYTHON_INSTALL_DIR}") + message(INFO, "Note: C++ linkable-shared libraries can be found: ${OTIO_PYTHON_INSTALL_DIR}/opentimelineio") endif() endif() else() - set(OTIO_RESOLVED_PYTHON_INSTALL_DIR "${OTIO_PYTHON_INSTALL_DIR}") set(OTIO_RESOLVED_CXX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}") set(OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") message(INFO, "OTIO C++ installing to ${CMAKE_INSTALL_PREFIX}")