diff --git a/CMakeLists.txt b/CMakeLists.txt index 79e1a6ef95dac916385a3619db43f168fffae371..ddbd21c93fe2900dd36109355248a00806227ec3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,16 +14,6 @@ find_package(Qt5 5.15 REQUIRED COMPONENTS set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -qt5_use_modules(${PROJECT_NAME} - Core - Gui - Qml - Quick - QuickWidgets - QuickControls2 - Widgets -) - if(UNIX) if(DARWIN) @@ -77,10 +67,24 @@ endif() target_include_directories(${PROJECT_NAME} PRIVATE ./CellframeNodeDiagtool) target_include_directories(${PROJECT_NAME} PRIVATE ./CellframeNodeTray) - target_link_libraries(${PROJECT_NAME} +target_link_libraries(${PROJECT_NAME} PUBLIC Qt5::Core Qt5::Gui Qt5::Network Qt5::Widgets Qt5::Qml Qt5::QuickWidgets ) + +qt5_import_plugins(${PROJECT_NAME} + INCLUDE + qtquick2plugin + Qt5::QtQuickControls2Plugin + Qt5::QtQuick2Plugin + Qt5::QtQuickLayoutsPlugin + Qt5::QtQuickTemplates2Plugin + Qt5::QtQuickWindowPlugin + Qt5::QtQuick2WindowPlugin + Qt5::QWindowsIntegrationPlugin + +) + if (WIN32) target_link_libraries(${PROJECT_NAME} PUBLIC psapi) endif()