CMakeLists.txt 1.48 KB
Newer Older
Volker Krause's avatar
Volker Krause committed
1
set(itinerary_srcs
2
    pkpassmanager.cpp
3
    reservationmanager.cpp
4 5
    timelinemodel.cpp
)
Volker Krause's avatar
Volker Krause committed
6 7 8 9 10 11
ecm_qt_declare_logging_category(itinerary_srcs
    HEADER logging.h
    IDENTIFIER Log
    CATEGORY_NAME org.kde.itinerary
)
add_library(itinerary STATIC ${itinerary_srcs})
12
target_link_libraries(itinerary PUBLIC
13
    KPim::Itinerary
Volker Krause's avatar
Volker Krause committed
14
    KPim::PkPass
15
    KF5::I18n
16
    Qt5::Network
17 18 19 20
)

add_executable(itinerary-app
    main.cpp
21
    applicationcontroller.cpp
22
    localizer.cpp
23 24 25 26 27 28 29 30
    pkpassimageprovider.cpp
    qml.qrc
)
target_include_directories(itinerary-app PRIVATE ${CMAKE_BINARY_DIR})
target_link_libraries(itinerary-app PRIVATE
    itinerary
    Qt5::Quick
)
31 32 33 34 35 36 37
if (ANDROID)
    # explicitly add runtime dependencies and transitive link dependencies,
    # so androiddeployqt picks them up
    target_link_libraries(itinerary-app PRIVATE
        KF5::Archive
        KF5::Kirigami2
        Qt5::AndroidExtras
Volker Krause's avatar
Volker Krause committed
38
        Qt5::Svg
39 40
        KF5::Prison
    )
Volker Krause's avatar
Volker Krause committed
41 42 43 44

    kirigami_package_breeze_icons(ICONS
        document-open
        edit-delete
Volker Krause's avatar
Volker Krause committed
45
        go-next-symbolic
Volker Krause's avatar
Volker Krause committed
46 47
        map-symbolic
        view-calendar-day
Volker Krause's avatar
Volker Krause committed
48
        view-refresh
Volker Krause's avatar
Volker Krause committed
49
    )
50
else ()
51
    target_link_libraries(itinerary-app PRIVATE Qt5::Location)
52 53
    set_target_properties(itinerary-app PROPERTIES OUTPUT_NAME "itinerary")
endif()
54 55 56 57 58 59 60 61

qml_lint(
    main.qml
    BoardingPass.qml
    TimelinePage.qml
)

install(TARGETS itinerary-app ${INSTALL_TARGETS_DEFAULT_ARGS})
Volker Krause's avatar
Volker Krause committed
62 63 64
if (NOT ANDROID)
    install(PROGRAMS org.kde.itinerary.desktop DESTINATION ${KDE_INSTALL_APPDIR})
endif()