diff --git a/recipes/qt/5.x.x/test_package/CMakeLists.txt b/recipes/qt/5.x.x/test_package/CMakeLists.txt index 5f0647c685c50..46a126ea03cce 100644 --- a/recipes/qt/5.x.x/test_package/CMakeLists.txt +++ b/recipes/qt/5.x.x/test_package/CMakeLists.txt @@ -9,7 +9,7 @@ conan_set_vs_runtime() conan_set_libcxx() conan_output_dirs_setup() -find_package(Qt5 COMPONENTS Core REQUIRED CONFIG) +find_package(Qt5 COMPONENTS Core Network Sql REQUIRED CONFIG) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) @@ -20,4 +20,4 @@ add_executable(${PROJECT_NAME} ${SOURCES}) # Must compile with "-fPIC" since Qt was built with -reduce-relocations. target_compile_options(${PROJECT_NAME} PRIVATE -fPIC) -target_link_libraries(${PROJECT_NAME} Qt5::Core) +target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Network Qt5::Sql) diff --git a/recipes/qt/5.x.x/test_package/meson.build b/recipes/qt/5.x.x/test_package/meson.build index afb1bb221b05b..ed8b8bf9a339a 100644 --- a/recipes/qt/5.x.x/test_package/meson.build +++ b/recipes/qt/5.x.x/test_package/meson.build @@ -1,6 +1,6 @@ project('test_package', 'cpp') qt5 = import('qt5') -qt5_dep = dependency('qt5', modules: ['Core']) +qt5_dep = dependency('qt5', modules: ['Core', 'Network', 'Sql']) moc_files = qt5.preprocess(moc_headers : 'greeter.h', qresources : 'example.qrc') executable('test_package', 'test_package.cpp', moc_files, dependencies : qt5_dep) diff --git a/recipes/qt/5.x.x/test_package/test_package.cpp b/recipes/qt/5.x.x/test_package/test_package.cpp index ffcc7f966de93..1aa0febbebcd7 100644 --- a/recipes/qt/5.x.x/test_package/test_package.cpp +++ b/recipes/qt/5.x.x/test_package/test_package.cpp @@ -5,6 +5,12 @@ #include "greeter.h" #include +// Qt Network test +#include + +// Qt Sql test +#include + int main(int argc, char *argv[]){ QCoreApplication app(argc, argv); QCoreApplication::setApplicationName("Application Example"); @@ -25,5 +31,8 @@ int main(int argc, char *argv[]){ qDebug() << "Resource content:" << f.readAll(); f.close(); + QNetworkAccessManager networkTester; + + QSqlDatabase sqlTester; return app.exec(); } diff --git a/recipes/qt/5.x.x/test_package/test_package.pro b/recipes/qt/5.x.x/test_package/test_package.pro index 1024feaf820d0..51c7df45aea35 100644 --- a/recipes/qt/5.x.x/test_package/test_package.pro +++ b/recipes/qt/5.x.x/test_package/test_package.pro @@ -5,6 +5,7 @@ HEADERS += greeter.h RESOURCES = example.qrc QT -= gui +QT += network sql CONFIG += console