Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ncar/eol_scons
Browse files Browse the repository at this point in the history
  • Loading branch information
topher800 committed Jan 27, 2025
2 parents ebc4b74 + 181afa3 commit 79d67b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion eol_scons/parseconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def ParseConfig(env: Environment, command: str, function=None, unique=True):


def _search_paths():
search_prefixes = ['/usr', '/usr/local', '/opt/homebrew', '/ucrt64']
search_prefixes = ['/usr', '/usr/local', '/ucrt64']
search_paths = [os.path.join(p, "bin") for p in search_prefixes]
return search_paths

Expand Down
4 changes: 4 additions & 0 deletions eol_scons/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ def generate(env, **_kw):
env.LogDebug("Generating eol defaults for Environment(%s) @ %s" %
(name, env.Dir('#').get_abspath()))

# Add homebrew tool if we are on a Mac.
if env['PLATFORM'] == 'darwin':
env.Tool('homebrew')

# Internal includes need to be setup *before* OptPrefixSetup or any
# other includes, so that scons will scan for headers locally first.
# Otherwise it looks in the opt prefix include first, and it notices
Expand Down
4 changes: 1 addition & 3 deletions eol_scons/tools/qt6.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,7 @@ def generate(env):

# MacOS specifics. Qt6 pkg-config files are in a non-standard location.
if env['PLATFORM'] == "darwin":
brewPath = subprocess.run(['brew', '--prefix'], capture_output=True, text=True).stdout.strip()
env.AppendUnique(FRAMEWORKPATH=[brewPath + '/Frameworks',])
env.PrependENVPath('PKG_CONFIG_PATH', brewPath + '/opt/qt/libexec/lib/pkgconfig')
env.PrependENVPath('PKG_CONFIG_PATH', env['BREW_PREFIX'] + '/opt/qt/libexec/lib/pkgconfig')


# Try to find the Qt6 installation location, trying in order:
Expand Down
7 changes: 3 additions & 4 deletions eol_scons/tools/qwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ def generate(env):
qwtpcname = 'Qt5Qwt6'

if env['PLATFORM'] == 'darwin':
brewPath = subprocess.run(['brew', '--prefix'], capture_output=True, text=True).stdout.strip()
qwtPcPath = brewPath + '/opt/qwt/lib/pkgconfig'
qtPcPath = brewPath + '/opt/qt/libexec/lib/pkgconfig'
qwtPcPath = env['BREW_PREFIX'] + '/opt/qwt/lib/pkgconfig'
qtPcPath = env['BREW_PREFIX'] + '/opt/qt/libexec/lib/pkgconfig'

env.PrependENVPath('PKG_CONFIG_PATH', qtPcPath)
env.PrependENVPath('PKG_CONFIG_PATH', qwtPcPath)
# I feel we shouldn't need to add this, but pkg-config is not returning it.
env.AppendUnique(CPPPATH=brewPath+'/opt/qwt/lib/qwt.framework/Headers')
env.AppendUnique(CPPPATH=env['BREW_PREFIX']+'/opt/qwt/lib/qwt.framework/Headers')


pc.ParseConfig(env, 'pkg-config --cflags --libs ' + qwtpcname)
Expand Down

0 comments on commit 79d67b1

Please sign in to comment.