Skip to content

Commit

Permalink
[BUILD] Premake: do not add target suffix to OSX anymore, even on gmake
Browse files Browse the repository at this point in the history
[CI] Travis: adapted build paths since OSX gmake builds .app like Xcode
  • Loading branch information
hsandt committed Jul 15, 2020
1 parent ad2bdcd commit 5707b6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- PREMAKE_GENERATOR=gmake
# There are two OSX builds deployed, here is the gmake build
- DEPLOY=true
- DEPLOY_FILE=build/macosx_gmake_Release/bin/Game_OSX.zip
- DEPLOY_FILE=build/macosx_gmake_Release/bin/Game_gmake.app.zip
compiler: clang++
- os: osx
osx_image: xcode11.6
Expand Down Expand Up @@ -174,7 +174,7 @@ before_deploy:
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
if [[ $PREMAKE_GENERATOR == "gmake"* ]]; then
pushd build/macosx_${PREMAKE_GENERATOR}_Release/bin
zip -r Game_OSX.zip Game_OSX
zip -r Game_gmake.app.zip Game.app
popd
else
pushd build/macosx_${PREMAKE_GENERATOR}_Release/bin
Expand Down
6 changes: 3 additions & 3 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ project "Game"
frameworkdirs {"engine/third-party/SFML/extlibs/libs-osx/Frameworks"}

filter { "system:macosx", "action:gmake*"}
-- both OSX and Linux can generate extensionless executables, so add a suffix to distinguish them
targetsuffix "_OSX"
-- it seems that even with gmake, OSX builds an .app, so no need to add target suffix "_OSX"

-- unlike ...dirs {}, linkoptions does not interpret paths
-- so we must enter them relatively to location "build", hence "../"
Expand All @@ -75,7 +74,8 @@ project "Game"
}

filter { "system:linux" }
-- both OSX and Linux can generate extensionless executables, so add a suffix to distinguish them
-- only Linux can generate extensionless executables, but we keep the target suffix
-- we prepared when we thought OSX gmake would also build one, for now
targetsuffix "_Linux"

-- on Linux, we basically use the list on https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php
Expand Down

0 comments on commit 5707b6a

Please sign in to comment.