diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index f1f5551a4201c..41e94abc756f8 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -1539,10 +1539,8 @@ def _create_plugin(pluginname, libname, plugintype, requires): component = "qt" + m[:m.find("_")] if component not in self.cpp_info.components: continue - submodules_dir = os.path.join(object_dir, m) - for sub_dir in os.listdir(submodules_dir): - submodule_dir = os.path.join(submodules_dir, sub_dir) - obj_files = [os.path.join(submodule_dir, file) for file in os.listdir(submodule_dir)] + for root, _, files in os.walk(os.path.join(object_dir, m)): + obj_files = [os.path.join(root, file) for file in files] self.cpp_info.components[component].exelinkflags.extend(obj_files) self.cpp_info.components[component].sharedlinkflags.extend(obj_files) diff --git a/recipes/qt/6.x.x/test_package/CMakeLists.txt b/recipes/qt/6.x.x/test_package/CMakeLists.txt index 337604f1af6ee..d12764c12f1eb 100644 --- a/recipes/qt/6.x.x/test_package/CMakeLists.txt +++ b/recipes/qt/6.x.x/test_package/CMakeLists.txt @@ -4,6 +4,6 @@ project(test_package LANGUAGES CXX) find_package(Qt6 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) add_executable(${PROJECT_NAME} WIN32 test_package.cpp greeter.h example.qrc) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml Qt6::Widgets) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON)