Windows: VS and CMake support

Fix: Building packages with CMake is broken (#24241)

vsInstallPaths needs to be renamed vs_install_paths (#24297)
This commit is contained in:
Betsy McPhail
2021-06-10 12:18:31 -04:00
committed by Peter Scheibel
parent 15ef85e161
commit f8782c46d7
4 changed files with 33 additions and 30 deletions

View File

@@ -52,8 +52,8 @@ def setup_build_environment(self, env):
if '+pic' in self.spec:
env.append_flags('CFLAGS', self.compiler.cc_pic_flag)
if '+optimize' in self.spec:
env.append_flags('CFLAGS', '-O2')
env.append_flags('CFLAGS', '-O2')
# Build, install, and check both static and shared versions of the
# libraries when +shared
@when('+shared platform=windows')
@@ -65,7 +65,7 @@ def cmake(self, spec, prefix):
def build(self, spec, prefix):
for self._building_shared in (False, True):
super(Zlib, self).build(spec, prefix)
@when('+shared platform=windows')
def check(self):
for self._building_shared in (False, True):
@@ -80,11 +80,8 @@ def install(self, spec, prefix):
if '~shared' in spec:
config_args.append('--static')
configure('--prefix={0}'.format(prefix), *config_args)
make()
if self.run_tests:
make('check')
make('install')