mac-scons install SFML@2
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -54,7 +54,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: install dependencies,
|
name: install dependencies,
|
||||||
run: brew install scons SFML Boost
|
run: brew install scons SFML@2 Boost
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: build and unit test,
|
name: build and unit test,
|
||||||
|
10
SConstruct
10
SConstruct
@@ -287,10 +287,9 @@ if platform == 'darwin':
|
|||||||
|
|
||||||
# pretty sketchy, but should point to your brew installation directories
|
# pretty sketchy, but should point to your brew installation directories
|
||||||
if subprocess.call(['which', '-s', 'brew']) == 0: # HomeBrew
|
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 = {
|
brew_lib_versions = {
|
||||||
'boost': '1.85.0',
|
'boost': '1.85.0',
|
||||||
'sfml': '2.6.1'
|
|
||||||
}
|
}
|
||||||
for dir in possible_brew_dirs:
|
for dir in possible_brew_dirs:
|
||||||
if path.exists(f'{dir}/Cellar'):
|
if path.exists(f'{dir}/Cellar'):
|
||||||
@@ -298,6 +297,13 @@ if platform == 'darwin':
|
|||||||
env.Append(
|
env.Append(
|
||||||
LIBPATH=[f'{dir}/Cellar/{lib}/{version}/lib'],
|
LIBPATH=[f'{dir}/Cellar/{lib}/{version}/lib'],
|
||||||
CPPPATH=[f'{dir}/Cellar/{lib}/{version}/include'])
|
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
|
# Sometimes it's easier just to copy the dependencies into the repo dir
|
||||||
# We try to auto-detect this.
|
# We try to auto-detect this.
|
||||||
|
Reference in New Issue
Block a user