Skip to content

Commit

Permalink
python plugin packaging on macOS (medInria#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollot authored Nov 20, 2023
1 parent 8fdc8de commit eb05287
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
16 changes: 16 additions & 0 deletions packaging/apple/mac_packager.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,24 @@ for i in $*; do
injectDirs="$injectDirs -inject-dir=$i"
done

mkdir python_plugins
injectDirs="$injectDirs -inject-dir=@PROJECT_BINARY_DIR@/TmpInstall/python_plugins"

python_libs=''
for python_lib in @medInria_DIR@/bin/plugins/python/*; do
lib=${python_lib##*/}
libname=${lib%.so}
cp $python_lib python_plugins/$libname.dylib
python_libs="$python_libs $libname"
done

@dtk_DIR@/bin/dtkDeploy MUSICardio.app $injectDirs &>/dev/null

mkdir MUSICardio.app/Contents/Plugins/python
for python_lib in $python_libs; do
mv MUSICardio.app/Contents/Plugins/$python_lib.dylib MUSICardio.app/Contents/Plugins/python/$python_lib.so
done

@CMAKE_COMMAND@ -DCMAKE_INSTALL_PREFIX:STRING=MUSICardio.app/Contents/Resources -DCMAKE_INSTALL_COMPONENT:STRING=Python -P @pyncpp_DIR@/cmake_install.cmake

#Run fancy packaging apple script
Expand Down
5 changes: 0 additions & 5 deletions superbuild/projects_modules/pyncpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ function(pyncpp_project)
-D Qt5_DIR:PATH=${Qt5_DIR}
-D OPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT_DIR}
)
if(APPLE)
list(APPEND cmake_args
-D CMAKE_MACOSX_RPATH:BOOL=OFF
)
endif()
endif()

## #####################################################################
Expand Down

0 comments on commit eb05287

Please sign in to comment.