diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 56052ef3..08de4604 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -27,6 +27,10 @@ target_include_directories(musica_python # Set the rpath for the shared library if(APPLE) message(STATUS "Building for MacOS") + set_target_properties(musica_python PROPERTIES + INSTALL_RPATH "@loader_path" + BUILD_WITH_INSTALL_RPATH TRUE + ) elseif(UNIX) message(STATUS "Building for Linux") set_target_properties(musica_python PROPERTIES