mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-21 19:41:15 +00:00
aedi: ability to avoid prefix addition to search paths
prefix directory may not be added to search path via -I ... and -L ... command line options this helps to upgrade dependencies, so they won't use old header or library files
This commit is contained in:
parent
f2ba924a14
commit
36da3fe963
1 changed files with 18 additions and 10 deletions
|
@ -66,6 +66,7 @@ class BuildTarget(Target):
|
|||
self.environment = os.environ.copy()
|
||||
self.options = CommandLineOptions()
|
||||
self.multi_platform = True
|
||||
self.search_prefix = True
|
||||
|
||||
def configure(self, state: BuildState):
|
||||
os.makedirs(state.build_path, exist_ok=True)
|
||||
|
@ -75,21 +76,28 @@ class BuildTarget(Target):
|
|||
+ os.pathsep + '/Applications/CMake.app/Contents/bin' \
|
||||
+ os.pathsep + state.bin_path
|
||||
|
||||
if not state.xcode:
|
||||
env['CC'] = state.c_compiler()
|
||||
env['CXX'] = state.cxx_compiler()
|
||||
if state.xcode:
|
||||
return
|
||||
|
||||
for prefix in ('CPP', 'C', 'CXX', 'OBJC', 'OBJCXX'):
|
||||
varname = f'{prefix}FLAGS'
|
||||
env['CC'] = state.c_compiler()
|
||||
env['CXX'] = state.cxx_compiler()
|
||||
|
||||
for prefix in ('CPP', 'C', 'CXX', 'OBJC', 'OBJCXX'):
|
||||
varname = f'{prefix}FLAGS'
|
||||
|
||||
if self.search_prefix:
|
||||
self._update_env(varname, f'-I{state.include_path}')
|
||||
self._set_sdk(state, varname)
|
||||
self._set_os_version(state, varname)
|
||||
|
||||
ldflags = 'LDFLAGS'
|
||||
self._set_sdk(state, varname)
|
||||
self._set_os_version(state, varname)
|
||||
|
||||
ldflags = 'LDFLAGS'
|
||||
|
||||
if self.search_prefix:
|
||||
self._update_env(ldflags, f'-L{state.lib_path}')
|
||||
self._set_sdk(state, ldflags)
|
||||
self._set_os_version(state, ldflags)
|
||||
|
||||
self._set_sdk(state, ldflags)
|
||||
self._set_os_version(state, ldflags)
|
||||
|
||||
def _update_env(self, name: str, value: str):
|
||||
env = self.environment
|
||||
|
|
Loading…
Reference in a new issue