CMake: Improve handling of qtHaveModule in pro2cmake script
Map "qtHaveModule(foo)" in qmake to "TARGET Qt::Foo" in cmake. Change-Id: I63c251f0f2dfd2e95adc996a83b528e9b4e9636e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
5869195a9a
commit
f3cf1a6856
@ -37,7 +37,7 @@ import typing
|
||||
|
||||
import pyparsing as pp
|
||||
|
||||
from helper import map_qt_library, featureName, substitute_platform, substitute_libs
|
||||
from helper import map_qt_library, map_qt_base_library, featureName, substitute_platform, substitute_libs
|
||||
|
||||
|
||||
def _parse_commandline():
|
||||
@ -386,7 +386,10 @@ def map_condition(condition: str) -> str:
|
||||
# some features contain e.g. linux, that should not be turned upper case
|
||||
feature = re.match(r"(qtConfig|qtHaveModule)\(([a-zA-Z0-9_-]+)\)", part)
|
||||
if feature:
|
||||
part = 'QT_FEATURE_' + featureName(feature.group(2))
|
||||
if (feature.group(1) == "qtHaveModule"):
|
||||
part = 'TARGET {}'.format(map_qt_base_library(feature.group(2)))
|
||||
else:
|
||||
part = 'QT_FEATURE_' + featureName(feature.group(2))
|
||||
else:
|
||||
part = substitute_platform(part)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user