From f4b9bb3e15a9a8201bfaf47a07b2cca439080a5a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 28 May 2018 14:27:42 +0200 Subject: Avoid building tests that link to the resource on windows. Because we'd have to properly export the symbols for the linking on windows to work. --- examples/caldavresource/CMakeLists.txt | 6 +++++- examples/carddavresource/CMakeLists.txt | 6 +++++- examples/imapresource/CMakeLists.txt | 6 +++++- examples/maildirresource/CMakeLists.txt | 8 +++++--- examples/maildirresource/tests/CMakeLists.txt | 1 + examples/mailtransportresource/CMakeLists.txt | 6 +++++- 6 files changed, 26 insertions(+), 7 deletions(-) (limited to 'examples') diff --git a/examples/caldavresource/CMakeLists.txt b/examples/caldavresource/CMakeLists.txt index 353f0d7..d2859aa 100644 --- a/examples/caldavresource/CMakeLists.txt +++ b/examples/caldavresource/CMakeLists.txt @@ -11,4 +11,8 @@ target_link_libraries(${PROJECT_NAME} sink_webdav_common sink Qt5::Core Qt5::Net install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SINK_RESOURCE_PLUGINS_PATH} RUNTIME DESTINATION ${SINK_RESOURCE_PLUGINS_PATH}) -add_subdirectory(tests) +if (WIN32) + message("Not building caldavresource resource tests on windows") +else() + add_subdirectory(tests) +endif() diff --git a/examples/carddavresource/CMakeLists.txt b/examples/carddavresource/CMakeLists.txt index 0db0e1a..0632804 100644 --- a/examples/carddavresource/CMakeLists.txt +++ b/examples/carddavresource/CMakeLists.txt @@ -9,4 +9,8 @@ target_link_libraries(${PROJECT_NAME} sink_webdav_common sink Qt5::Core Qt5::Net install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SINK_RESOURCE_PLUGINS_PATH} RUNTIME DESTINATION ${SINK_RESOURCE_PLUGINS_PATH}) -add_subdirectory(tests) +if (WIN32) + message("Not building carddav resource tests on windows") +else() + add_subdirectory(tests) +endif() diff --git a/examples/imapresource/CMakeLists.txt b/examples/imapresource/CMakeLists.txt index 61b86ed..478ce2f 100644 --- a/examples/imapresource/CMakeLists.txt +++ b/examples/imapresource/CMakeLists.txt @@ -12,4 +12,8 @@ target_link_libraries(${PROJECT_NAME} sink Qt5::Core Qt5::Network KF5::Mime KIMA install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SINK_RESOURCE_PLUGINS_PATH} RUNTIME DESTINATION ${SINK_RESOURCE_PLUGINS_PATH}) -add_subdirectory(tests) +if (WIN32) + message("Not building imap resource tests on windows") +else() + add_subdirectory(tests) +endif() diff --git a/examples/maildirresource/CMakeLists.txt b/examples/maildirresource/CMakeLists.txt index 94910cb..1379363 100644 --- a/examples/maildirresource/CMakeLists.txt +++ b/examples/maildirresource/CMakeLists.txt @@ -9,6 +9,8 @@ target_link_libraries(${PROJECT_NAME} sink Qt5::Core Qt5::Network KF5::Mime) install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SINK_RESOURCE_PLUGINS_PATH} RUNTIME DESTINATION ${SINK_RESOURCE_PLUGINS_PATH}) -add_definitions(-DTESTDATAPATH="${CMAKE_CURRENT_SOURCE_DIR}/tests/data") - -add_subdirectory(tests) +if (WIN32) + message("Not building maildir resource tests on windows") +else() + add_subdirectory(tests) +endif() diff --git a/examples/maildirresource/tests/CMakeLists.txt b/examples/maildirresource/tests/CMakeLists.txt index b3e4050..867b56d 100644 --- a/examples/maildirresource/tests/CMakeLists.txt +++ b/examples/maildirresource/tests/CMakeLists.txt @@ -2,6 +2,7 @@ set(CMAKE_AUTOMOC ON) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) +add_definitions(-DTESTDATAPATH="${CMAKE_CURRENT_SOURCE_DIR}/data") include(SinkTest) diff --git a/examples/mailtransportresource/CMakeLists.txt b/examples/mailtransportresource/CMakeLists.txt index fe2e77c..9619dbe 100644 --- a/examples/mailtransportresource/CMakeLists.txt +++ b/examples/mailtransportresource/CMakeLists.txt @@ -28,4 +28,8 @@ target_link_libraries(sink_smtp_test ) install(TARGETS sink_smtp_test ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) -add_subdirectory(tests) +if (WIN32) + message("Not building mailtransport resource tests on windows") +else() + add_subdirectory(tests) +endif() -- cgit v1.2.3