Warning, /libraries/kpublictransport/src/onboard/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 if (TARGET KF6::NetworkManagerQt)
0005     set(HAVE_NM TRUE)
0006 endif()
0007 
0008 add_library(KPublicTransportOnboard)
0009 target_sources(KPublicTransportOnboard PRIVATE
0010     onboardstatus.cpp
0011     onboardstatusmanager.cpp
0012     positiondata.cpp
0013     wifimonitor.cpp
0014 
0015     backend/abstractonboardbackend.cpp
0016     backend/restonboardbackend.cpp
0017     backend/scriptedrestonboardbackend.cpp
0018 
0019     data/data.qrc
0020 )
0021 
0022 if (ANDROID)
0023     target_sources(KPublicTransportOnboard PRIVATE wifimonitor_android.cpp)
0024     add_subdirectory(android)
0025 elseif (HAVE_NM)
0026     target_sources(KPublicTransportOnboard PRIVATE wifimonitor_nm.cpp)
0027 else()
0028     message("WARNING: No Wifi monitoring implementation available on this platform!")
0029     target_sources(KPublicTransportOnboard PRIVATE wifimonitor_dummy.cpp)
0030 endif()
0031 
0032 ecm_qt_declare_logging_category(KPublicTransportOnboard
0033     HEADER logging.h
0034     IDENTIFIER KPublicTransport::Log
0035     CATEGORY_NAME org.kde.kpublictransport.onboard
0036     DESCRIPTION "KPublicTransport Onboard API"
0037     EXPORT KPUBLICTRANSPORTONBOARD
0038 )
0039 
0040 generate_export_header(KPublicTransportOnboard BASE_NAME KPublicTransportOnboard)
0041 set_target_properties(KPublicTransportOnboard PROPERTIES
0042     VERSION ${KPUBLICTRANSPORT_VERSION}
0043     SOVERSION ${KPUBLICTRANSPORT_SOVERSION}
0044 )
0045 target_include_directories(KPublicTransportOnboard PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
0046 target_include_directories(KPublicTransportOnboard INTERFACE "$<INSTALL_INTERFACE:${KPUBLICTRANSPORT_INSTALL_INCLUDEDIR}>")
0047 target_link_libraries(KPublicTransportOnboard
0048     PUBLIC
0049         KPublicTransport
0050     PRIVATE
0051         Qt::Network
0052         Qt::Qml
0053         KF6::I18nLocaleData
0054 )
0055 if (HAVE_NM)
0056     target_link_libraries(KPublicTransportOnboard PRIVATE KF6::NetworkManagerQt)
0057 endif()
0058 if (ANDROID)
0059     target_link_libraries(KPublicTransportOnboard PRIVATE Qt6::CorePrivate)
0060 endif()
0061 
0062 ecm_generate_headers(KPublicTransportOnboard_FORWARDING_HEADERS
0063     HEADER_NAMES
0064         OnboardStatus
0065     PREFIX KPublicTransport
0066     REQUIRED_HEADERS KPublicTransportOnboard_HEADERS
0067 )
0068 install(TARGETS KPublicTransportOnboard EXPORT KPublicTransportTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0069 ecm_qt_install_logging_categories(
0070     EXPORT KPUBLICTRANSPORTONBOARD
0071     FILE org_kde_kpublictransport_onboard.categories
0072     DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0073 )
0074 install(FILES
0075     ${KPublicTransportOnboard_FORWARDING_HEADERS}
0076     DESTINATION ${KPUBLICTRANSPORT_INSTALL_INCLUDEDIR}/KPublicTransport
0077 )
0078 install(FILES
0079     ${KPublicTransportOnboard_HEADERS}
0080     ${CMAKE_CURRENT_BINARY_DIR}/kpublictransportonboard_export.h
0081     DESTINATION ${KPUBLICTRANSPORT_INSTALL_INCLUDEDIR}/kpublictransport
0082 )