Skip to content

Commit

Permalink
Merge pull request #371 from NQNStudios/mac-fix
Browse files Browse the repository at this point in the history
More homebrew search paths in Mac Scons
  • Loading branch information
CelticMinstrel authored Jun 23, 2024
2 parents 9ae81ca + 73fc5be commit 5d73325
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,19 @@ if platform == 'darwin':
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
brew_boost_version = '1.85.0'
env.Append(
LIBPATH=['/usr/local/Cellar/boost/'+brew_boost_version+'/lib'],
CPPPATH=['/usr/local/Cellar/boost/'+brew_boost_version+'/include'])
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(
LIBPATH=[f'{dir}/Cellar/{lib}/{version}/lib'],
CPPPATH=[f'{dir}/Cellar/{lib}/{version}/include'])

# Sometimes it's easier just to copy the dependencies into the repo dir
# We try to auto-detect this.
Expand Down

0 comments on commit 5d73325

Please sign in to comment.