Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5f4fe8b0 authored by Christophe Giboudeaux's avatar Christophe Giboudeaux

Use the new FindSasl2.cmake

parent 13cbb881
......@@ -6,7 +6,13 @@ project(libksieve VERSION ${PIM_VERSION})
set(KF5_VERSION "5.39.0")
find_package(ECM ${KF5_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${libksieve_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
# TODO: Remove the cmake directory when we'll require ECM >= 5.41.0
if("${ECM_VERSION}" VERSION_LESS "5.41.0")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${libksieve_SOURCE_DIR}/cmake)
endif()
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
endif()
......@@ -37,7 +43,6 @@ set(KIMAP_LIB_VERSION "5.6.80")
option(KDEPIM_ENTERPRISE_BUILD "Enable features specific to the enterprise branch, which are normally disabled. Also, it disables many components not needed for Kontact such as the Kolab client." FALSE)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets PrintSupport WebEngine WebEngineWidgets)
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5DocTools ${KF5_VERSION} CONFIG REQUIRED)
......@@ -56,13 +61,7 @@ find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5IMAP ${KIMAP_LIB_VERSION} CONFIG REQUIRED)
find_package(Sasl2)
set_package_properties(Sasl2 PROPERTIES
DESCRIPTION "The Cyrus-sasl library"
URL "http://www.cyrussasl.org"
TYPE OPTIONAL
)
include_directories(${Sasl2_INCLUDE_DIRS})
set_package_properties(Sasl2 PROPERTIES TYPE REQUIRED)
ecm_setup_version(PROJECT VARIABLE_PREFIX LIBKSIEVE
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libksieve_version.h"
......
......@@ -5,12 +5,11 @@ ecm_qt_declare_logging_category(kio_sieve_PART_SRCS HEADER sieve_debug.h IDENTIF
add_library(kio_sieve MODULE ${kio_sieve_PART_SRCS})
if (WIN32)
set(extra_LIBS ws2_32)
endif()
target_link_libraries(kio_sieve KF5::KIOCore KF5::I18n Qt5::Network KF5::WidgetsAddons ${Sasl2_LIBRARIES} ${extra_LIBS})
target_link_libraries(kio_sieve KF5::KIOCore KF5::I18n Qt5::Network KF5::WidgetsAddons Sasl2::Sasl2 ${extra_LIBS})
set_target_properties(kio_sieve PROPERTIES OUTPUT_NAME "sieve")
install(TARGETS kio_sieve DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio/)
......
find_package(Sasl2)
set_package_properties(Sasl2 PROPERTIES DESCRIPTION "Cyrus SASL API" URL "http://asg.web.cmu.edu/sasl/sasl-library.html" TYPE REQUIRED PURPOSE "Required to support authentication of logins on ManageSieve servers.")
include_directories(${SASL2_INCLUDE_DIR})
set(kmanagesieve_LIB_SRCS
response.cpp
session.cpp
......@@ -25,11 +20,10 @@ PRIVATE
KF5::I18n
KF5::KIOCore
KF5::KIOWidgets
${Sasl2_LIBRARIES}
Sasl2::Sasl2
${extra_LIBS}
)
set_target_properties(KF5KManageSieve PROPERTIES
VERSION ${LIBKSIEVE_VERSION_STRING}
SOVERSION ${LIBKSIEVE_SOVERSION}
......
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