Commit fc7621ed authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Export symbol for test apps

parent 57ecba5f
Pipeline #62777 failed with stage
in 5 minutes and 32 seconds
......@@ -118,6 +118,9 @@ install(FILES
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(BUILD_TESTING)
add_definitions(-DBUILD_TESTING)
endif()
add_subdirectory(src)
if (BUILD_TESTING)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Test)
......
......@@ -57,6 +57,7 @@ target_link_libraries(testindividualmaildialog
Qt::Widgets
KF5::WidgetsAddons
KF5::I18n
KF5::IncidenceEditor
)
if (KDEPIM_RUN_AKONADI_TEST)
......
/* This file is part of the KDE project
SPDX-FileCopyrightText: 2007 David Faure <faure@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#pragma once
#include "incidenceeditor_export.h"
/* Classes which are exported only for unit tests */
#ifdef BUILD_TESTING
#ifndef INCIDENCEEDITOR_TESTS_EXPORT
#define INCIDENCEEDITOR_TESTS_EXPORT INCIDENCEEDITOR_EXPORT
#endif
#else /* not compiling tests */
#define INCIDENCEEDITOR_TESTS_EXPORT
#endif
......@@ -5,7 +5,7 @@
*/
#pragma once
#include "incidenceeditor_private_export.h"
#include <KCalendarCore/Attendee>
#include <QDialog>
......@@ -18,7 +18,7 @@ namespace IncidenceEditorNG
{
// Shows a dialog with a question and the option to select which attendee should get the mail or to open a composer for him.
// Used to get individual mails for attendees of an event.
class IndividualMailDialog : public QDialog
class INCIDENCEEDITOR_TESTS_EXPORT IndividualMailDialog : public QDialog
{
Q_OBJECT
friend class ::TestIndividualMailDialog;
......
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
../
)
set(resourcemanagement_gui_SRCS resourcemanagment_gui.cpp)
add_executable(resourcemanagement_gui ${resourcemanagement_gui_SRCS})
add_executable(resourcemanagement_gui resourcemanagment_gui.cpp)
target_link_libraries(resourcemanagement_gui
Qt::Core
Qt::Gui
......@@ -15,7 +10,7 @@ target_link_libraries(resourcemanagement_gui
KF5::Ldap
)
add_executable(individualmaildialog_test individualmaildialog_test.cpp ../src/individualmaildialog.cpp)
add_executable(individualmaildialog_test individualmaildialog_test.cpp)
target_link_libraries(individualmaildialog_test
KF5::IncidenceEditor
)
......@@ -4,7 +4,7 @@
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "../src/individualmaildialog.h"
#include "individualmaildialog.h"
#include <KGuiItem>
#include <QApplication>
......
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