1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-11-24 01:40:18 +01:00

Compare commits

..

4 commits

Author SHA1 Message Date
Orazio
faf4ef2cf2 Make build-mac-app.sh executable 2023-07-31 11:56:02 +02:00
Orazio
704249a522 Make build-mac-app.sh not fail on repeated runs 2023-07-31 11:55:37 +02:00
Orazio
6f9e6159e1 Use same /Libs folder as libs search path 2023-07-31 11:55:02 +02:00
Orazio
5a9c05656d Add libs search paths to CMakeLists.txt instead of find files 2023-07-31 11:54:07 +02:00
5 changed files with 9 additions and 13 deletions

2
.gitignore vendored
View file

@ -266,7 +266,7 @@ __pycache__/
/Export /Export
/DrMem /DrMem
/Doc private /Doc private
# Windows local libraries # Windows and macOS local libraries
/Libs /Libs
#CMake generated #CMake generated

View file

@ -24,6 +24,8 @@ if(APPLE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH true) set(CMAKE_BUILD_WITH_INSTALL_RPATH true)
set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks") set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64") set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
list(APPEND SDL2_PATH "${CMAKE_CURRENT_LIST_DIR}/Libs")
list(APPEND SDL2_MIXER_PATH "${CMAKE_CURRENT_LIST_DIR}/Libs")
endif() endif()
# SDL2main is not needed # SDL2main is not needed

View file

@ -77,7 +77,6 @@ SET(SDL2_SEARCH_PATHS
/opt/csw # Blastwave /opt/csw # Blastwave
/opt /opt
${SDL2_PATH} ${SDL2_PATH}
${CMAKE_SOURCE_DIR}/extern
) )
FIND_PATH(SDL2_INCLUDE_DIR SDL.h FIND_PATH(SDL2_INCLUDE_DIR SDL.h

View file

@ -42,11 +42,6 @@
# (To distribute this file outside of CMake, substitute the full # (To distribute this file outside of CMake, substitute the full
# License text for the above reference.) # License text for the above reference.)
SET(SDL2_MIXER_SEARCH_PATHS
${SDL2_MIXER_PATH}
${CMAKE_SOURCE_DIR}/extern
)
find_path(SDL2_MIXER_INCLUDE_DIR SDL_mixer.h find_path(SDL2_MIXER_INCLUDE_DIR SDL_mixer.h
HINTS HINTS
ENV SDL2MIXERDIR ENV SDL2MIXERDIR
@ -54,7 +49,7 @@ find_path(SDL2_MIXER_INCLUDE_DIR SDL_mixer.h
PATH_SUFFIXES SDL2 PATH_SUFFIXES SDL2
# path suffixes to search inside ENV{SDLDIR} # path suffixes to search inside ENV{SDLDIR}
include/SDL2 include include/SDL2 include
PATHS ${SDL2_MIXER_SEARCH_PATHS} PATHS ${SDL2_MIXER_PATH}
) )
if(CMAKE_SIZEOF_VOID_P EQUAL 8) if(CMAKE_SIZEOF_VOID_P EQUAL 8)
@ -69,7 +64,7 @@ find_library(SDL2_MIXER_LIBRARY
ENV SDL2MIXERDIR ENV SDL2MIXERDIR
ENV SDL2DIR ENV SDL2DIR
PATH_SUFFIXES lib bin ${VC_LIB_PATH_SUFFIX} PATH_SUFFIXES lib bin ${VC_LIB_PATH_SUFFIX}
PATHS ${SDL2_MIXER_SEARCH_PATHS} PATHS ${SDL2_MIXER_PATH}
) )
if(SDL2_MIXER_INCLUDE_DIR AND EXISTS "${SDL2_MIXER_INCLUDE_DIR}/SDL_mixer.h") if(SDL2_MIXER_INCLUDE_DIR AND EXISTS "${SDL2_MIXER_INCLUDE_DIR}/SDL_mixer.h")

8
build-mac-app.sh Normal file → Executable file
View file

@ -2,9 +2,9 @@
set -xe set -xe
mkdir extern mkdir -p Libs
cd extern cd Libs
sdl_version='2.28.1' sdl_version='2.28.1'
sdl_filename="SDL2-$sdl_version.dmg" sdl_filename="SDL2-$sdl_version.dmg"
@ -47,8 +47,8 @@ mkdir -p SpaceCadetPinball.app/Contents/Frameworks
cp -a Platform/macOS/Info.plist SpaceCadetPinball.app/Contents/ cp -a Platform/macOS/Info.plist SpaceCadetPinball.app/Contents/
cp -a Platform/macOS/SpaceCadetPinball.icns SpaceCadetPinball.app/Contents/Resources/ cp -a Platform/macOS/SpaceCadetPinball.icns SpaceCadetPinball.app/Contents/Resources/
cp -a extern/SDL2.framework SpaceCadetPinball.app/Contents/Frameworks/ cp -a Libs/SDL2.framework SpaceCadetPinball.app/Contents/Frameworks/
cp -a extern/SDL2_mixer.framework SpaceCadetPinball.app/Contents/Frameworks/ cp -a Libs/SDL2_mixer.framework SpaceCadetPinball.app/Contents/Frameworks/
cp -a bin/SpaceCadetPinball SpaceCadetPinball.app/Contents/MacOS/ cp -a bin/SpaceCadetPinball SpaceCadetPinball.app/Contents/MacOS/
sed -i '' "s/CHANGEME_SW_VERSION/$sw_version/" SpaceCadetPinball.app/Contents/Info.plist sed -i '' "s/CHANGEME_SW_VERSION/$sw_version/" SpaceCadetPinball.app/Contents/Info.plist