dependencies/curses: don't try ncurses-config or system dependency on windows

with msys ncurses-config returns a unix style path (currently, though
it's been fixed upstream), which the compilers don't understand, so we
can't do that. Additionally, while the system search does work, there's
missing include directories that need to be added.
This commit is contained in:
Dylan Baker 2020-09-29 15:00:51 -07:00
parent 9a47509764
commit a3106776a6
1 changed files with 8 additions and 4 deletions

View File

@ -489,11 +489,15 @@ def curses_factory(env: 'Environment', for_machine: 'MachineChoice',
for pkg in pkgconfig_files:
candidates.append(functools.partial(PkgConfigDependency, pkg, env, kwargs))
if DependencyMethods.CONFIG_TOOL in methods:
candidates.append(functools.partial(CursesConfigToolDependency, 'curses', env, kwargs))
# There are path handling problems with these methods on msys, and they
# don't apply to windows otherwise (cygwin is handled seperately from
# windows)
if not env.machines[for_machine].is_windows():
if DependencyMethods.CONFIG_TOOL in methods:
candidates.append(functools.partial(CursesConfigToolDependency, 'curses', env, kwargs))
if DependencyMethods.SYSTEM in methods:
candidates.append(functools.partial(CursesSystemDependency, 'curses', env, kwargs))
if DependencyMethods.SYSTEM in methods:
candidates.append(functools.partial(CursesSystemDependency, 'curses', env, kwargs))
return candidates