From 3fc4239a3738e1a239cd10f1daf4d18a7bc53c1c Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Sun, 19 May 2024 16:49:53 +0200 Subject: [PATCH] cmake Build so for designer plugin --- CMakeLists.txt | 3 ++- designer/CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 designer/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e3729b..6d8258b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(examples) add_subdirectory(playground) add_subdirectory(src) -add_subdirectory(tests) \ No newline at end of file +add_subdirectory(tests) +add_subdirectory(designer) diff --git a/designer/CMakeLists.txt b/designer/CMakeLists.txt new file mode 100644 index 0000000..f9f2356 --- /dev/null +++ b/designer/CMakeLists.txt @@ -0,0 +1,36 @@ +find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Widgets UiPlugin Gui Designer) +find_package(Qt6 REQUIRED COMPONENTS Core Widgets UiPlugin Gui Designer) + +qt_add_plugin(qwt_designer) + +target_include_directories(qwt_designer + PRIVATE + ../src/ + ${CMAKE_CURRENT_LIST_DIR}/ +# ${PROJECT_BINARY_DIR}/ +) + +target_compile_definitions(qwt_designer + PRIVATE + "QWT_MOC_INCLUDE" +) +add_definitions(-DQT_PLUGIN) +add_definitions(-DQT_NO_DEBUG) +add_definitions(-DQT_SHARED) +add_definitions(-DQDESIGNER_EXPORT_WIDGETS) + +target_sources(qwt_designer + PRIVATE + qwt_designer_plugin.cpp + qwt_designer_plugin.qrc +) + +target_link_libraries(qwt_designer + PRIVATE + Qt6::Core + Qt6::Gui + Qt6::UiPlugin + Qt6::Widgets + Qt6::Designer + qwt +)