CMakeLists.txt 897 Bytes
Newer Older
Nicolas Fella's avatar
Nicolas Fella committed
1 2
add_subdirectory(dateandtime)

3 4 5 6
set(ktrip_SRCS
    main.cpp
    querycontroller.cpp
    locationquerymodel.cpp
7
    locationcache.cpp
8 9
)

Nicolas Fella's avatar
Nicolas Fella committed
10 11 12 13
if (ANDROID)
    list(APPEND ktrip_SRCS androidutils.cpp)
endif()

Nicolas Fella's avatar
Nicolas Fella committed
14
qt5_add_resources(ktrip_SRCS resources.qrc)
15
add_executable(ktrip ${ktrip_SRCS})
Nicolas Fella's avatar
Nicolas Fella committed
16
target_link_libraries(ktrip PRIVATE Qt5::Qml Qt5::Gui KF5::I18n KPublicTransport)
Nicolas Fella's avatar
Nicolas Fella committed
17

Nicolas Fella's avatar
Nicolas Fella committed
18
if (ANDROID)
Nicolas Fella's avatar
Nicolas Fella committed
19 20 21 22 23 24 25 26 27 28 29 30
    target_link_libraries(ktrip PRIVATE
        KF5::Kirigami2
        Qt5::Svg
        OpenSSL::SSL
        Qt5::AndroidExtras
    )

    kirigami_package_breeze_icons(ICONS
        go-down-symbolic
        go-next-symbolic
        go-up-symbolic
        view-refresh
Nicolas Fella's avatar
Nicolas Fella committed
31
        search
Nicolas Fella's avatar
Nicolas Fella committed
32
    )
Nicolas Fella's avatar
Nicolas Fella committed
33
else()
Nicolas Fella's avatar
Nicolas Fella committed
34
    target_link_libraries(ktrip PRIVATE Qt5::Widgets)
Nicolas Fella's avatar
Nicolas Fella committed
35 36
endif()

Nicolas Fella's avatar
Nicolas Fella committed
37 38 39 40 41
install(TARGETS ktrip ${INSTALL_TARGETS_DEFAULT_ARGS})

if (NOT ANDROID)
    install(PROGRAMS org.kde.ktrip.desktop DESTINATION ${KDE_INSTALL_APPDIR})
endif()