CMakeLists.txt 1.04 KB
Newer Older
1
2
set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

3
4
5
6
set(JSONINTERFACE_SOURCES
    jsonarchiveinterface.cpp
    jsonparser.cpp
)
Laurent Montel's avatar
Laurent Montel committed
7
add_library(jsoninterface STATIC ${JSONINTERFACE_SOURCES})
Elvis Angelaccio's avatar
Elvis Angelaccio committed
8
target_link_libraries(jsoninterface kerfuffle)
9

10
ecm_add_tests(
11
    addtoarchivetest.cpp
Elvis Angelaccio's avatar
Elvis Angelaccio committed
12
    deletetest.cpp
Elvis Angelaccio's avatar
Elvis Angelaccio committed
13
    loadtest.cpp
14
15
16
17
    extracttest.cpp
    addtest.cpp
    movetest.cpp
    copytest.cpp
18
    createdialogtest.cpp
19
    metadatatest.cpp
20
    mimetypetest.cpp
Nicolas Fella's avatar
Nicolas Fella committed
21
    LINK_LIBRARIES testhelper kerfuffle Qt5::Test KF5::ConfigCore KF5::KIOCore
22
23
24
25
26
    NAME_PREFIX kerfuffle-)

ecm_add_test(
    adddialogtest.cpp
    LINK_LIBRARIES kerfuffle Qt5::Test KF5::KIOFileWidgets
27
    NAME_PREFIX kerfuffle-)
28

29
30
31
32
ecm_add_tests(
    jobstest.cpp
    LINK_LIBRARIES jsoninterface Qt5::Test
    NAME_PREFIX kerfuffle-)
33

34
# metadatatest needs the number of plugins actually installed by an install() command.
35
36
list(REMOVE_ITEM INSTALLED_KERFUFFLE_PLUGINS "")
list(LENGTH INSTALLED_KERFUFFLE_PLUGINS INSTALLED_COUNT)
37
target_compile_definitions(metadatatest PRIVATE -DPLUGINS_COUNT=${INSTALLED_COUNT})