On macOS, copy libngspice dylibs and symlinks

Now that ngspice creates soversion'ed libraries, we need to tweak
how we copy the dylibs around.

This is meant to address
https://gitlab.com/kicad/code/kicad/-/issues/9143.

(cherry picked from commit ec10b12c6a)
This commit is contained in:
Adam Wolf 2021-10-12 11:23:00 -05:00 committed by Seth Hillbrand
parent 9b6798c479
commit 420a3ce498
1 changed files with 7 additions and 5 deletions

View File

@ -423,11 +423,13 @@ if( APPLE )
) )
if( KICAD_SPICE ) if( KICAD_SPICE )
# bundle libngspice, codemodels and scripts # bundle libngspice and codemodels
get_filename_component( REAL_LIBNGSPICE ${NGSPICE_LIBRARY} REALPATH ) get_filename_component( ABS_LIBNGSPICE ${NGSPICE_LIBRARY} ABSOLUTE )
get_filename_component( LIBNGSPICE_PATH ${REAL_LIBNGSPICE} DIRECTORY ) get_filename_component( LIBNGSPICE_PATH ${ABS_LIBNGSPICE} DIRECTORY )
install( FILES "${REAL_LIBNGSPICE}"
DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" ) install( DIRECTORY "${LIBNGSPICE_PATH}/"
DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim"
FILES_MATCHING PATTERN "*.dylib")
install( DIRECTORY "${LIBNGSPICE_PATH}/ngspice" install( DIRECTORY "${LIBNGSPICE_PATH}/ngspice"
DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" ) DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" )
install( DIRECTORY "${LIBNGSPICE_PATH}/../share/ngspice/scripts" install( DIRECTORY "${LIBNGSPICE_PATH}/../share/ngspice/scripts"