CMakeLists.txt 1.73 KB
Newer Older
1
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test)
2

3
include_directories(
4
    ${KDEConnectCore_BINARY_DIR}
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
5
    ${CMAKE_SOURCE_DIR}
Nicolas Fella's avatar
Nicolas Fella committed
6
    ${CMAKE_BINARY_DIR}
Adam Pigg's avatar
Adam Pigg committed
7
    ${CMAKE_BINARY_DIR}/plugins/sendnotifications/
8
    ${CMAKE_BINARY_DIR}/smsapp/
9 10
)

Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
11
set(kdeconnect_libraries
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
12
	kdeconnectcore
13
    KF5::I18n
14
    KF5::KIOWidgets
15
    Qt5::DBus
16 17
    Qt5::Network
    Qt5::Test
18
    qca-qt5
19
)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
20

21 22 23 24 25 26 27 28
set(kdeconnect_sms_libraries
    ${kdeconnect_libraries}
    kdeconnectinterfaces
    kdeconnectsms
    Qt5::Quick
    KF5::People
)

29
ecm_add_test(pluginloadtest.cpp LINK_LIBRARIES ${kdeconnect_libraries})
30
ecm_add_test(sendfiletest.cpp LINK_LIBRARIES ${kdeconnect_libraries})
31
ecm_add_test(networkpackettests.cpp LINK_LIBRARIES ${kdeconnect_libraries})
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
32 33 34 35 36
ecm_add_test(testsocketlinereader.cpp TEST_NAME testsocketlinereader LINK_LIBRARIES ${kdeconnect_libraries})
ecm_add_test(testsslsocketlinereader.cpp TEST_NAME testsslsocketlinereader LINK_LIBRARIES ${kdeconnect_libraries})
ecm_add_test(kdeconnectconfigtest.cpp TEST_NAME kdeconnectconfigtest LINK_LIBRARIES ${kdeconnect_libraries})
ecm_add_test(lanlinkprovidertest.cpp TEST_NAME lanlinkprovidertest LINK_LIBRARIES ${kdeconnect_libraries})
ecm_add_test(devicetest.cpp TEST_NAME devicetest LINK_LIBRARIES ${kdeconnect_libraries})
37
ecm_add_test(testnotificationlistener.cpp
38 39 40
             ../plugins/sendnotifications/sendnotificationsplugin.cpp
             ../plugins/sendnotifications/notificationslistener.cpp
             ../plugins/sendnotifications/notifyingapplication.cpp
41
             TEST_NAME testnotificationlistener
42
             LINK_LIBRARIES ${kdeconnect_libraries} Qt5::DBus KF5::Notifications KF5::IconThemes)
43 44 45
if(SMSAPP_ENABLED)
    ecm_add_test(testconversationlistmodel.cpp LINK_LIBRARIES ${kdeconnect_sms_libraries})
endif()