Skip to content
Permalink
Browse files

cmake: Ignore if madbundle.sh fails.

  • Loading branch information...
unknownbrackets committed Sep 15, 2019
1 parent 7fd96c9 commit daf07032a664d04252528933f14212b5def470b9
Showing with 6 additions and 6 deletions.
  1. +1 −1 CMakeLists.txt
  2. +5 −5 SDL/macbundle.sh
@@ -1996,7 +1996,7 @@ if(TargetBin)
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${SHADER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource} "ios/Launch Screen.storyboard")
else()
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${SHADER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource})
if(TARGET SDL2::SDL2)
if(TARGET SDL2::SDL2 AND NOT USING_QT_UI)
add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/SDL/macbundle.sh" "${CMAKE_BINARY_DIR}/PPSSPPSDL.app")
endif()
endif()
@@ -5,7 +5,7 @@ PPSSPPSDL="${PPSSPP}/Contents/MacOS/PPSSPPSDL"

if [ ! -f "${PPSSPPSDL}" ]; then
echo "No such file: ${PPSSPPSDL}!"
exit 1
exit 0
fi

SDL=$(otool -L "${PPSSPPSDL}" | grep -v @executable_path | grep -Eo /.+libSDL.+dylib)
@@ -16,12 +16,12 @@ fi

if [ ! -f "${SDL}" ]; then
echo "Cannot locate SDL: ${SDL}!"
exit 1
exit 0
fi

echo "Installing SDL from ${SDL}..."

SDLNAME=$(basename "${SDL}")
mkdir -p "${PPSSPP}/Contents/Frameworks" || exit 1
cp -r "$SDL" "${PPSSPP}/Contents/Frameworks" || exit 1
install_name_tool -change "${SDL}" "@executable_path/../Frameworks/${SDLNAME}" "${PPSSPPSDL}" || exit 1
mkdir -p "${PPSSPP}/Contents/Frameworks" || exit 0
cp -r "$SDL" "${PPSSPP}/Contents/Frameworks" || exit 0
install_name_tool -change "${SDL}" "@executable_path/../Frameworks/${SDLNAME}" "${PPSSPPSDL}" || exit 0

0 comments on commit daf0703

Please sign in to comment.
You can’t perform that action at this time.