mac-scons install SFML@2

This commit is contained in:
2025-01-12 11:40:39 -06:00
committed by Celtic Minstrel
parent e8bcd663c3
commit 129d9417ab
2 changed files with 9 additions and 3 deletions

View File

@@ -54,7 +54,7 @@
},
{
name: install dependencies,
run: brew install scons SFML Boost
run: brew install scons SFML@2 Boost
},
{
name: build and unit test,

View File

@@ -287,10 +287,9 @@ if platform == 'darwin':
# pretty sketchy, but should point to your brew installation directories
if subprocess.call(['which', '-s', 'brew']) == 0: # HomeBrew
possible_brew_dirs = ['/usr/local', '/opt/homebrew']
possible_brew_dirs = ['/usr/local', '/opt/homebrew', '/usr/local/opt']
brew_lib_versions = {
'boost': '1.85.0',
'sfml': '2.6.1'
}
for dir in possible_brew_dirs:
if path.exists(f'{dir}/Cellar'):
@@ -298,6 +297,13 @@ if platform == 'darwin':
env.Append(
LIBPATH=[f'{dir}/Cellar/{lib}/{version}/lib'],
CPPPATH=[f'{dir}/Cellar/{lib}/{version}/include'])
# SFML@2 installed in alternate path
elif path.exists(f'{dir}/sfml@2'):
env.Append(
LIBPATH=[f'{dir}/sfml@2/lib'],
CPPPATH=[f'{dir}/sfml@2/include'])
# Sometimes it's easier just to copy the dependencies into the repo dir
# We try to auto-detect this.