From df2ff50aa2eabb491dcbf3a232fe10716a9f347d Mon Sep 17 00:00:00 2001 From: Bernhard Stegmaier Date: Wed, 17 May 2017 08:14:18 -0400 Subject: [PATCH] Fix OSX bundling issue. Bundle kicad-ogltest as a console tool into the main KiCad bundle where the other tools reside. --- utils/kicad-ogltest/CMakeLists.txt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/utils/kicad-ogltest/CMakeLists.txt b/utils/kicad-ogltest/CMakeLists.txt index b6d71f649e..cc629152b1 100644 --- a/utils/kicad-ogltest/CMakeLists.txt +++ b/utils/kicad-ogltest/CMakeLists.txt @@ -17,7 +17,7 @@ set( OGLTEST_FILES kicad-ogltest.cpp ) -add_executable( kicad-ogltest WIN32 MACOSX_BUNDLE +add_executable( kicad-ogltest WIN32 ${OGLTEST_FILES} ) target_link_libraries( kicad-ogltest @@ -28,10 +28,23 @@ target_link_libraries( kicad-ogltest ${wxWidgets_LIBRARIES} ) if( APPLE ) - # puts binaries into the *.app bundle while linking + # puts binary into the main kicad.app bundle while linking set_target_properties( kicad-ogltest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_BIN_DIR} ) + # bundle dependencies, rewrite binary to use bundled libraries + install( CODE " + # override default embedded path settings + ${OSX_BUNDLE_OVERRIDE_PATHS} + + # do all the work + include( BundleUtilities ) + fixup_bundle( ${OSX_BUNDLE_BUILD_BIN_DIR}/kicad-ogltest + \"\" + \"\" + ) + " COMPONENT Runtime + ) else() install( TARGETS kicad-ogltest DESTINATION ${KICAD_BIN}