Warning, /plasma-mobile/raven/src/mimetreeparser/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2017 Christian Mollekopf <mollekopf@kolabsys.com>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 include_directories(
0005     ${CMAKE_CURRENT_BINARY_DIR}
0006     ${CMAKE_CURRENT_SOURCE_DIR}/..
0007     ${GPGME_INCLUDE_DIRS}
0008 )
0009 
0010 set(AUTOMOC ON)
0011 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
0012 add_definitions(-DMAIL_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/../testdata" )
0013 
0014 include(ECMAddTests)
0015 include(${CMAKE_SOURCE_DIR}/cmake/modules/add_gpg_crypto_test.cmake)
0016 
0017 find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Test)
0018 
0019 function(add_mimetreeparser_class_unittest _name _additionalSource)
0020     add_executable(${_name} ${_name}.cpp setupenv.cpp ${_additionalSource})
0021     target_link_libraries(${_name}
0022         Qt5::Core
0023         Qt5::Test
0024         KF5::Mime
0025         kalendar_lib
0026         KF5::MailCommon
0027         KF5::AkonadiMime
0028         kalendar_mail_plugin
0029     )
0030     add_test(NAME ${_name} COMMAND $<TARGET_FILE:${_name}>)
0031 endfunction()
0032 
0033 function(add_mimetreeparser_crypto_unittest _name)
0034     add_executable(${_name} ${_name}.cpp setupenv.cpp)
0035     if (QT_MAJOR_VERSION STREQUAL "6")
0036         target_link_libraries(${_name} QGpgmeQt6 Qt6::Core5Compat)
0037     else()
0038         target_link_libraries(${_name} Gpgme::Gpgme)
0039     endif()
0040     target_link_libraries(${_name}
0041         Qt5::Core
0042         Qt5::Test
0043         KF5::Mime
0044         kalendar_lib
0045         KF5::MailCommon
0046         KF5::AkonadiMime
0047         kalendar_mail_plugin
0048     )
0049     add_gpg_crypto_test(${_name} mimetreeparser-${_name})
0050 endfunction()
0051 
0052 add_mimetreeparser_crypto_unittest(attachmenttest)
0053 add_mimetreeparser_class_unittest(cryptohelpertest "../cryptohelper.cpp")