Add macOS KICAD_BUNDLE_LIBS search path for bundle fixup.

This commit is contained in:
Adam Wolf 2019-12-24 22:17:35 -06:00
parent b2cc454878
commit ac20428b82
2 changed files with 11 additions and 3 deletions

View File

@ -101,12 +101,17 @@ if( APPLE )
set( SCRIPTING_HELPER "0" )
endif()
if( KICAD_USE_OCC )
set( KICAD_BUNDLE_LIBS ${OCC_LIBRARY_DIR} )
endif()
# make main bundle relocatable
install( CODE "
# find all libs and modules
file( GLOB PLUGINS_KIFACE ${OSX_BUNDLE_INSTALL_KIFACE_DIR}/*.kiface )
file( GLOB_RECURSE PLUGINS_SO ${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/*.so )
set( BUNDLE_FIX_LIBS \${PLUGINS_KIFACE} \${PLUGINS_SO} )
file( GLOB_RECURSE PLUGINS_3D ${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/3d/*.dylib )
set( BUNDLE_FIX_LIBS \${PLUGINS_KIFACE} \${PLUGINS_SO} \${PLUGINS_3D} )
if( ${SCRIPTING_HELPER} )
file( GLOB WXPYTHON_DIR RELATIVE ${OSX_BUNDLE_INSTALL_LIB_DIR}/${PYTHON_LIB_DIR} ${OSX_BUNDLE_INSTALL_LIB_DIR}/${PYTHON_LIB_DIR}/wx-?.?-osx_cocoa )
file( GLOB PYTHON_SCRIPTING_SO ${OSX_BUNDLE_INSTALL_LIB_DIR}/${PYTHON_LIB_DIR}/*.so )
@ -123,7 +128,7 @@ if( APPLE )
fixup_bundle( ${OSX_BUNDLE_INSTALL_BIN_DIR}/kicad
\"\${BUNDLE_FIX_LIBS}\"
\"\"
\" ${KICAD_BUNDLE_LIBS}\"
)
" COMPONENT Runtime
)

View File

@ -28,6 +28,9 @@ target_link_libraries( kicad-ogltest
${wxWidgets_LIBRARIES} )
if( APPLE )
if( KICAD_USE_OCC )
set( KICAD_BUNDLE_LIBS ${OCC_LIBRARIES} )
endif()
# puts binary into the main kicad.app bundle while linking
set_target_properties( kicad-ogltest PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_BIN_DIR}
@ -41,7 +44,7 @@ if( APPLE )
include( BundleUtilities )
fixup_bundle( ${OSX_BUNDLE_BUILD_BIN_DIR}/kicad-ogltest
\"\"
\"\"
\" ${KICAD_BUNDLE_LIBS}\"
)
" COMPONENT Runtime
)