Commit 4b72041c authored by Nicolas Fella's avatar Nicolas Fella

Do Android stuff in CMakeLists

parent 28c2c624
......@@ -16,11 +16,25 @@ find_package(Qt5 REQUIRED COMPONENTS Gui Qml)
find_package(KF5 REQUIRED COMPONENTS I18n)
if (ANDROID)
find_package(Qt5 REQUIRED COMPONENTS AndroidExtras)
# runtime dependencies are build-time dependencies on Android
find_package(Qt5 REQUIRED COMPONENTS AndroidExtras Svg)
find_package(KF5 REQUIRED COMPONENTS Kirigami2)
if (NOT DEFINED BREEZEICONS_DIR AND EXISTS ${CMAKE_SOURCE_DIR}/../breeze-icons)
set(BREEZEICONS_DIR ${CMAKE_SOURCE_DIR}/../breeze-icons)
endif()
find_package(OpenSSL REQUIRED)
else()
find_package(Qt5 REQUIRED COMPONENTS Widgets)
endif()
find_package(KPublicTransport REQUIRED)
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_definitions(-DQT_USE_QSTRINGBUILDER)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_subdirectory(src)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -10,10 +10,39 @@ endif()
qt5_add_resources(ktrip_SRCS resources.qrc)
add_executable(ktrip ${ktrip_SRCS})
target_link_libraries(ktrip Qt5::Qml Qt5::Gui KPublicTransport)
target_link_libraries(ktrip PRIVATE Qt5::Qml Qt5::Gui KPublicTransport)
if (ANDROID)
target_link_libraries(ktrip Qt5::AndroidExtras)
target_link_libraries(ktrip PRIVATE
KF5::Kirigami2
Qt5::Svg
OpenSSL::SSL
Qt5::AndroidExtras
)
kirigami_package_breeze_icons(ICONS
checkmark
clock
dialog-cancel
document-edit
document-open
document-save
documentinfo
edit-delete
edit-download
edit-paste
go-down-symbolic
go-home
go-next-symbolic
go-up-symbolic
help-about
map-symbolic
meeting-attending
question
settings-configure
view-calendar-day
view-refresh
)
else()
target_link_libraries(ktrip Qt5::Widgets)
endif()
......
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