Fix OSX bundling issue.

Bundle kicad-ogltest as a console tool into the main KiCad bundle where
the other tools reside.
This commit is contained in:
Bernhard Stegmaier 2017-05-17 08:14:18 -04:00 committed by Wayne Stambaugh
parent e79f97860c
commit df2ff50aa2
1 changed files with 15 additions and 2 deletions

View File

@ -17,7 +17,7 @@ set( OGLTEST_FILES
kicad-ogltest.cpp kicad-ogltest.cpp
) )
add_executable( kicad-ogltest WIN32 MACOSX_BUNDLE add_executable( kicad-ogltest WIN32
${OGLTEST_FILES} ) ${OGLTEST_FILES} )
target_link_libraries( kicad-ogltest target_link_libraries( kicad-ogltest
@ -28,10 +28,23 @@ target_link_libraries( kicad-ogltest
${wxWidgets_LIBRARIES} ) ${wxWidgets_LIBRARIES} )
if( APPLE ) 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 set_target_properties( kicad-ogltest PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_BIN_DIR} 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() else()
install( TARGETS kicad-ogltest install( TARGETS kicad-ogltest
DESTINATION ${KICAD_BIN} DESTINATION ${KICAD_BIN}