diff --git a/tests/auto/corelib/kernel/CMakeLists.txt b/tests/auto/corelib/kernel/CMakeLists.txt index 4abddd700f0..511e4f39dbc 100644 --- a/tests/auto/corelib/kernel/CMakeLists.txt +++ b/tests/auto/corelib/kernel/CMakeLists.txt @@ -15,7 +15,7 @@ add_subdirectory(qmetaproperty) # add_subdirectory(qmetatype) add_subdirectory(qmetaenum) if(NOT ((NOT TARGET Qt::Gui))) - # add_subdirectory(qmimedata) + add_subdirectory(qmimedata) endif() if(NOT ((ANDROID OR APPLE_UIKIT) OR (NOT TARGET Qt::Network))) # add_subdirectory(qobject) diff --git a/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt b/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt index dd1e049209b..7b373d6e6a4 100644 --- a/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt @@ -7,6 +7,8 @@ add_qt_test(tst_qmimedata SOURCES tst_qmimedata.cpp + PUBLIC_LIBRARIES + Qt::Gui ) #### Keys ignored in scope 1:.:.:qmimedata.pro:: diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 8dab147d54c..80c975cec19 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -378,10 +378,12 @@ class Scope(object): 'QT_SOURCE_TREE': [SetOperation(['${QT_SOURCE_TREE}'])], 'QT_BUILD_TREE': [SetOperation(['${PROJECT_BUILD_DIR}'])], }) -> None: + self._operations = copy.deepcopy(operations) if parent_scope: parent_scope._add_child(self) else: self._parent = None # type: typing.Optional[Scope] + self._operations['QT'] = [SetOperation(['core', 'gui'])] self._basedir = base_dir if file: @@ -398,7 +400,6 @@ class Scope(object): self._condition = map_condition(condition) self._children = [] # type: typing.List[Scope] self._included_children = [] # type: typing.List[Scope] - self._operations = copy.deepcopy(operations) self._visited_keys = set() # type: typing.Set[str] self._total_condition = None # type: typing.Optional[str]