fix cmake target configuration selection.

0.54
Alexander Neumann 5 years ago committed by Nirbheek Chauhan
parent cf561b5cfc
commit 2f359ca5f5
  1. 13
      mesonbuild/cmake/interpreter.py
  2. 11
      mesonbuild/dependencies/base.py

@ -353,9 +353,16 @@ class ConverterTarget:
if 'CONFIGURATIONS' in tgt.properties:
cfgs += [x for x in tgt.properties['CONFIGURATIONS'] if x]
cfg = cfgs[0]
if 'RELEASE' in cfgs:
cfg = 'RELEASE'
is_debug = self.env.coredata.get_builtin_option('debug');
if is_debug:
if 'DEBUG' in cfgs:
cfg = 'DEBUG'
elif 'RELEASE' in cfgs:
cfg = 'RELEASE'
else:
if 'RELEASE' in cfgs:
cfg = 'RELEASE'
if 'IMPORTED_IMPLIB_{}'.format(cfg) in tgt.properties:
libraries += [x for x in tgt.properties['IMPORTED_IMPLIB_{}'.format(cfg)] if x]

@ -1456,8 +1456,15 @@ class CMakeDependency(ExternalDependency):
cfgs = [x for x in tgt.properties['IMPORTED_CONFIGURATIONS'] if x]
cfg = cfgs[0]
if 'RELEASE' in cfgs:
cfg = 'RELEASE'
is_debug = self.env.coredata.get_builtin_option('debug');
if is_debug:
if 'DEBUG' in cfgs:
cfg = 'DEBUG'
elif 'RELEASE' in cfgs:
cfg = 'RELEASE'
else:
if 'RELEASE' in cfgs:
cfg = 'RELEASE'
if 'IMPORTED_IMPLIB_{}'.format(cfg) in tgt.properties:
libraries += [x for x in tgt.properties['IMPORTED_IMPLIB_{}'.format(cfg)] if x]

Loading…
Cancel
Save