Skip to content
Permalink
Browse files

macos: static link SDL2, lower minimim OS requirements

  • Loading branch information
JaCzekanski committed Sep 17, 2019
1 parent e3ce3f8 commit 183062e23171ef03b5d10553f69ddeeba88a4878
Showing with 10 additions and 5 deletions.
  1. +1 −1 .travis/macos/build.sh
  2. +3 −2 premake5.lua
  3. +6 −2 src/platform/windows/gui/filesystem.h
@@ -15,7 +15,7 @@ ccache --set-config=sloppiness=pch_defines,time_macros
premake5 xcode4

# Build
xcodebuild -workspace Avocado.xcworkspace -scheme avocado -configuration release -parallelizeTargets -jobs 4 | xcpretty
set -o pipefail && xcodebuild -workspace Avocado.xcworkspace -scheme avocado -configuration release -parallelizeTargets -jobs 4 | xcpretty

# Package
mkdir -p $ARTIFACT
@@ -67,7 +67,8 @@ filter "system:macosx"
platforms {"x64"}
defaultplatform "x64"
xcodebuildsettings {
['ALWAYS_SEARCH_USER_PATHS'] = {'YES'}
["ALWAYS_SEARCH_USER_PATHS"] = "YES",
["MACOSX_DEPLOYMENT_TARGET"] = "10.12",
}

filter "system:android"
@@ -268,7 +269,7 @@ project "avocado"
"imgui",
}
buildoptions {getOutput("sdl2-config --cflags")}
linkoptions {getOutput("sdl2-config --libs")}
linkoptions {getOutput("sdl2-config --static-libs")}

filter {"system:android"}
files {
@@ -1,9 +1,13 @@
#pragma once

#if defined(__has_include) && __has_include(<filesystem>) && !defined(ANDROID)
// Android has filesystem headers, but required library is missing
// macOS has filesystem since 10.15 - I wanna support older macOS versions
// For these systems GHC fallback is used.

#if defined(__has_include) && __has_include(<filesystem>) && !defined(ANDROID) && !defined(__APPLE__)
#include <filesystem>
namespace fs = std::filesystem;
#elif defined(__has_include) && __has_include(<experimental/filesystem>) && !defined(ANDROID)
#elif defined(__has_include) && __has_include(<experimental/filesystem>) && !defined(ANDROID) && !defined(__APPLE__)
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#else

0 comments on commit 183062e

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