Commit 327d44ce authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: Time to increase dependancy. Use new macro for generating designer plugins

parent 9a4c5eff
......@@ -3,7 +3,7 @@ set(PIM_VERSION "5.12.41")
project(libkdepim VERSION ${PIM_VERSION})
set(KF5_MIN_VERSION "5.61.0")
set(KF5_MIN_VERSION "5.62.0")
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
......@@ -62,15 +62,8 @@ 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)
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()
option(BUILD_DESIGNERPLUGIN "Build plugin for Qt Designer" ON)
add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt Designer")
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
......
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)"
)
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)"
)
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()
endif()
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
)
[Global]
PluginName=KDEPimWidgets
[KPIM::KCheckComboBox]
ToolTip=Combobox with checkable items (KDE-PIM)
WhatsThis=A combobox that allows the user to check the items in the drop down menu
IncludeFile=Libkdepim/KCheckComboBox
ConstructorArgs=(parent)
Group=Input (KDE-PIM)
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)"
)
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)"
)
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()
endif()
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
)
[Global]
PluginName=KDEPimAkonadiWidgets
[KPIM::AddresseeLineEdit]
ToolTip=Addressee Line Edit (KDE-PIM)
WhatsThis=A line edit which lets you select addressees from the addressbook
IncludeFile=LibkdepimAkonadi/AddresseeLineEdit
Group=Input (KDE-PIM)
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