Commit 1f36fed5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use new designer plugin ecm macro

parent 41c70323
......@@ -60,8 +60,15 @@ endif()
set(DISABLE_AKONADI_SEARCH ${FORCE_DISABLE_AKONADI_SEARCH})
configure_file(config-akonadi-search.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config-akonadi-search.h)
find_package(KF5DesignerPlugin ${KF5_MIN_VERSION} CONFIG)
set_package_properties(KF5DesignerPlugin PROPERTIES DESCRIPTION "KF5 designer plugin" TYPE OPTIONAL)
set(USE_NEW_DESIGNERPLUGIN_MACRO false)
if (ECM_VERSION VERSION_GREATER "5.61.0")
option(BUILD_DESIGNERPLUGIN "Build plugin for Qt Designer" ON)
add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt Designer")
set(USE_NEW_DESIGNERPLUGIN_MACRO true)
else()
find_package(KF5DesignerPlugin ${KF5_MIN_VERSION} CONFIG)
set_package_properties(KF5DesignerPlugin PROPERTIES DESCRIPTION "KF5 designer plugin" TYPE OPTIONAL)
endif()
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DQT_NO_FOREACH)
......
if (KF5DesignerPlugin_FOUND)
kf5designerplugin_add_plugin(kdepimwidgets kdepim.widgets)
if (USE_NEW_DESIGNERPLUGIN_MACRO)
include(ECMAddQtDesignerPlugin)
ecm_qtdesignerplugin_widget(KPIM::KCheckComboBox
INCLUDE_FILE "Libkdepim/KCheckComboBox"
TOOLTIP "Combobox with checkable items (KDE-PIM)"
WHATSTHIS "A combobox that allows the user to check the items in the drop down menu"
GROUP "Input (KDE-PIM)"
)
target_link_libraries(kdepimwidgets
KF5::Libkdepim KF5::Completion
)
if(NOT WIN32)
# Since there are no libraries provided by this module,
# there is no point including the build tree in RPath,
# and then having to edit it at install time.
set_target_properties(kdepimwidgets PROPERTIES
SKIP_BUILD_RPATH TRUE
BUILD_WITH_INSTALL_RPATH TRUE
ecm_add_qtdesignerplugin(kdepimwidgets
NAME KDEPimWidgets
OUTPUT_NAME kdepimwidgets
WIDGETS
KPIM::KCheckComboBox
LINK_LIBRARIES
KF5::Libkdepim
KF5::Completion
INSTALL_DESTINATION "${KDE_INSTALL_QTPLUGINDIR}/designer"
COMPONENT Devel
)
else()
if (KF5DesignerPlugin_FOUND)
kf5designerplugin_add_plugin(kdepimwidgets kdepim.widgets)
target_link_libraries(kdepimwidgets
KF5::Libkdepim KF5::Completion
)
if(NOT WIN32)
# Since there are no libraries provided by this module,
# there is no point including the build tree in RPath,
# and then having to edit it at install time.
set_target_properties(kdepimwidgets PROPERTIES
SKIP_BUILD_RPATH TRUE
BUILD_WITH_INSTALL_RPATH TRUE
)
endif()
install(TARGETS
kdepimwidgets
DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/designer
)
endif()
install(TARGETS
kdepimwidgets
DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/designer
)
endif()
if (KF5DesignerPlugin_FOUND)
kf5designerplugin_add_plugin(kdepimakonadiwidgets kdepimakonadi.widgets)
if (USE_NEW_DESIGNERPLUGIN_MACRO)
include(ECMAddQtDesignerPlugin)
ecm_qtdesignerplugin_widget(KPIM::AddresseeLineEdit
INCLUDE_FILE "LibkdepimAkonadi/AddresseeLineEdit"
TOOLTIP "Addressee Line Edit (KDE-PIM)"
WHATSTHIS "A line edit which lets you select addressees from the addressbook"
GROUP "Input (KDE-PIM)"
)
target_link_libraries(kdepimakonadiwidgets
KF5::LibkdepimAkonadi KF5::Completion
)
if(NOT WIN32)
# Since there are no libraries provided by this module,
# there is no point including the build tree in RPath,
# and then having to edit it at install time.
set_target_properties(kdepimwidgets PROPERTIES
SKIP_BUILD_RPATH TRUE
BUILD_WITH_INSTALL_RPATH TRUE
ecm_add_qtdesignerplugin(kdepimakonadiwidgets
NAME KDEPimAkonadiWidgets
OUTPUT_NAME kdepimakonadiwidgets
WIDGETS
KPIM::AddresseeLineEdit
LINK_LIBRARIES
KF5::LibkdepimAkonadi
KF5::Completion
INSTALL_DESTINATION "${KDE_INSTALL_QTPLUGINDIR}/designer"
COMPONENT Devel
)
else()
if (KF5DesignerPlugin_FOUND)
kf5designerplugin_add_plugin(kdepimakonadiwidgets kdepimakonadi.widgets)
target_link_libraries(kdepimakonadiwidgets
KF5::LibkdepimAkonadi KF5::Completion
)
if(NOT WIN32)
# Since there are no libraries provided by this module,
# there is no point including the build tree in RPath,
# and then having to edit it at install time.
set_target_properties(kdepimwidgets PROPERTIES
SKIP_BUILD_RPATH TRUE
BUILD_WITH_INSTALL_RPATH TRUE
)
endif()
install(TARGETS
kdepimakonadiwidgets
DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/designer
)
endif()
install(TARGETS
kdepimakonadiwidgets
DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/designer
)
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment