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 6b372545 authored by Christophe Giboudeaux's avatar Christophe Giboudeaux

Cleanup. Add todo

parent 66a2bc12
......@@ -7,7 +7,12 @@ project(KIMAP VERSION ${PIM_VERSION})
set(KF5_VERSION "5.39.0")
find_package(ECM ${KF5_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${KIMAP_SOURCE_DIR}/cmake)
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} ${KIMAP_SOURCE_DIR}/cmake)
endif()
include(GenerateExportHeader)
include(ECMGenerateHeaders)
......@@ -35,19 +40,14 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KIMAP
)
########### Find packages ###########
find_package(Sasl2)
set_package_properties(Sasl2 PROPERTIES TYPE REQUIRED)
find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_LIBS_VERSION} CONFIG REQUIRED)
find_package(Sasl2)
set_package_properties(Sasl2 PROPERTIES
DESCRIPTION "The Cyrus-sasl library"
URL "http://www.cyrussasl.org"
TYPE REQUIRED
)
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5IMAP")
add_definitions(-DTRANSLATION_DOMAIN=\"libkimap5\")
......@@ -71,7 +71,10 @@ if(BUILD_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(cmake)
# TODO: Remove the cmake directory when we'll require ECM >= 5.41.0
if("${ECM_VERSION}" VERSION_LESS "5.41.0")
add_subdirectory(cmake)
endif()
########### Install Files ###########
install(FILES
......
......@@ -2,8 +2,6 @@
# Turn exceptions on
kde_enable_exceptions()
include_directories(${Sasl2_INCLUDE_DIRS})
set(kimap_SRCS
acl.cpp
acljobbase.cpp
......@@ -59,7 +57,7 @@ generate_export_header(KF5IMAP BASE_NAME kimap)
add_library(KF5::IMAP ALIAS KF5IMAP)
target_include_directories(KF5IMAP INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KIMAP;${Sasl2_INCLUDE_DIRS}>")
target_include_directories(KF5IMAP INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KIMAP>")
target_include_directories(KF5IMAP PUBLIC "$<BUILD_INTERFACE:${KIMAP_SOURCE_DIR}/src;${KIMAP_BINARY_DIR}/src>")
if (WIN32)
......@@ -74,11 +72,10 @@ PRIVATE
KF5::KIOCore
KF5::Codecs
KF5::I18n
${Sasl2_LIBRARIES}
Sasl2::Sasl2
${extra_LIBS}
)
set_target_properties(KF5IMAP PROPERTIES
VERSION ${KIMAP_VERSION_STRING}
SOVERSION ${KIMAP_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