Warning, /pim/libksieve/src/ksieve/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 ecm_setup_version(PROJECT VARIABLE_PREFIX LIBKSIEVE
0005                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libksieve_version.h"
0006                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPim6KSieveConfigVersion.cmake"
0007                         SOVERSION 6
0008 )
0009 
0010 add_library(KPim6KSieve)
0011 add_library(KPim6::KSieve ALIAS KPim6KSieve)
0012 
0013 target_sources(KPim6KSieve PRIVATE
0014     utf8validator.cpp
0015     utf8validator.h
0016     lexer.cpp
0017     lexer_p.h
0018     lexer.h
0019     parser.cpp
0020     parser.h
0021     parser_p.h
0022     error.cpp
0023     error.h
0024 )
0025 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
0026     set_target_properties(KPim6KSieve PROPERTIES UNITY_BUILD ON)
0027 endif()
0028 generate_export_header(KPim6KSieve BASE_NAME ksieve)
0029 
0030 target_link_libraries(KPim6KSieve
0031     PRIVATE
0032     Qt::Core KF6::I18n
0033 )
0034 
0035 set_target_properties(KPim6KSieve PROPERTIES
0036     VERSION ${LIBKSIEVE_VERSION}
0037     SOVERSION ${LIBKSIEVE_SOVERSION}
0038     EXPORT_NAME KSieve
0039 )
0040 
0041 
0042 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KPim6KSieve")
0043 
0044 configure_package_config_file(
0045     "${CMAKE_CURRENT_SOURCE_DIR}/KPimKSieveConfig.cmake.in"
0046     "${CMAKE_CURRENT_BINARY_DIR}/KPim6KSieveConfig.cmake"
0047     INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0048 )
0049 
0050 install(FILES
0051     "${CMAKE_CURRENT_BINARY_DIR}/KPim6KSieveConfig.cmake"
0052     "${CMAKE_CURRENT_BINARY_DIR}/KPim6KSieveConfigVersion.cmake"
0053     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0054     COMPONENT Devel
0055 )
0056 
0057 install(EXPORT KPim6KSieveTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KPim6KSieveTargets.cmake NAMESPACE KPim6::)
0058 
0059 install(FILES
0060     ${CMAKE_CURRENT_BINARY_DIR}/libksieve_version.h
0061     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/KSieve COMPONENT Devel
0062 )
0063 
0064 target_include_directories(KPim6KSieve PUBLIC "$<BUILD_INTERFACE:${libksieve_SOURCE_DIR}/src;${libksieve_BINARY_DIR}/src>")
0065 install(TARGETS KPim6KSieve EXPORT KPim6KSieveTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})