diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 8c4cf2b0e3..a54c1f5919 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -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 ) diff --git a/utils/kicad-ogltest/CMakeLists.txt b/utils/kicad-ogltest/CMakeLists.txt index c905af0016..e4aacf7f1d 100644 --- a/utils/kicad-ogltest/CMakeLists.txt +++ b/utils/kicad-ogltest/CMakeLists.txt @@ -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 )