Warning, /pim/kdepim-runtime/resources/ews/test/unittests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 #
0002 #  SPDX-FileCopyrightText: 2015-2018 Krzysztof Nowicki <krissn@op.pl>
0003 #
0004 #  SPDX-License-Identifier: LGPL-2.0-or-later
0005 
0006 kde_enable_exceptions()
0007 
0008 add_library(uttesthelpers STATIC faketransferjob.cpp faketransferjob.h)
0009 target_link_libraries(uttesthelpers Qt::Core KF6::KIOCore)
0010 
0011 macro(akonadi_ews_add_ut_advanced utname extra_SRCS)
0012   add_executable(${utname} ${utname}.cpp ${extra_SRCS})
0013   target_link_libraries(${utname} Qt::Test uttesthelpers)
0014   add_test(NAME ${utname} COMMAND ${utname})
0015 endmacro(akonadi_ews_add_ut_advanced utname)
0016 
0017 macro(akonadi_ews_add_ut utname)
0018   akonadi_ews_add_ut_advanced(${utname} "")
0019   target_link_libraries(${utname} ewsclient)
0020 endmacro(akonadi_ews_add_ut utname)
0021 
0022 akonadi_ews_add_ut(ewsmoveitemrequest_ut)
0023 akonadi_ews_add_ut(ewsdeleteitemrequest_ut)
0024 akonadi_ews_add_ut(ewsgetitemrequest_ut)
0025 akonadi_ews_add_ut(ewsunsubscriberequest_ut)
0026 akonadi_ews_add_ut(ewsattachment_ut)
0027 
0028 qt_wrap_cpp(ewssettings_ut_SRCS ewssettings_ut_mock.h)
0029 akonadi_ews_add_ut_advanced(ewssettings_ut "${CMAKE_CURRENT_SOURCE_DIR}/../../ewssettings.cpp;${ewssettings_ut_SRCS}")
0030 target_link_libraries(ewssettings_ut
0031   KPim6::AkonadiCore
0032   KF6::WidgetsAddons
0033   KF6::I18n
0034   KF6::ConfigCore
0035   KF6::ConfigGui
0036   KF6::CoreAddons
0037   KF6::Wallet
0038   )
0039 target_compile_definitions(ewssettings_ut PUBLIC -DEWSSETTINGS_UNITTEST)
0040 
0041 if (TARGET Qt::NetworkAuth)
0042   set(ewsoauth_ut_SRCS
0043     ewsoauth_ut_mock.cpp ewsoauth_ut_mock.h
0044     ${CMAKE_CURRENT_SOURCE_DIR}/../../ewsclient/auth/ewsabstractauth.cpp
0045     ${CMAKE_CURRENT_SOURCE_DIR}/../../ewsclient/auth/ewsoauth.cpp)
0046   akonadi_ews_add_ut_advanced(ewsoauth_ut "${ewsoauth_ut_SRCS}")
0047   target_link_libraries(ewsoauth_ut
0048     Qt::Widgets
0049     KF6::I18n
0050     Qt::WebEngineWidgets
0051     )
0052   target_compile_definitions(ewsoauth_ut PUBLIC -DEWSOAUTH_UNITTEST)
0053 endif ()