More homebrew search paths in Mac Scons
This commit is contained in:
15
SConstruct
15
SConstruct
@@ -256,12 +256,19 @@ if platform == 'darwin':
|
|||||||
CPPPATH=['/sw/include']
|
CPPPATH=['/sw/include']
|
||||||
)
|
)
|
||||||
|
|
||||||
# pretty sketchy, but should point to your boost install
|
# 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
|
||||||
brew_boost_version = '1.85.0'
|
possible_brew_dirs = ['/usr/local', '/opt/homebrew']
|
||||||
|
brew_lib_versions = {
|
||||||
|
'boost': '1.85.0',
|
||||||
|
'sfml': '2.6.1'
|
||||||
|
}
|
||||||
|
for dir in possible_brew_dirs:
|
||||||
|
if path.exists(f'{dir}/Cellar'):
|
||||||
|
for lib, version in brew_lib_versions.items():
|
||||||
env.Append(
|
env.Append(
|
||||||
LIBPATH=['/usr/local/Cellar/boost/'+brew_boost_version+'/lib'],
|
LIBPATH=[f'{dir}/Cellar/{lib}/{version}/lib'],
|
||||||
CPPPATH=['/usr/local/Cellar/boost/'+brew_boost_version+'/include'])
|
CPPPATH=[f'{dir}/Cellar/{lib}/{version}/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