Warning, /network/ktp-auth-handler/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 # KDE Application Version, managed by release script
0004 set(RELEASE_SERVICE_VERSION_MAJOR "23")
0005 set(RELEASE_SERVICE_VERSION_MINOR "07")
0006 set(RELEASE_SERVICE_VERSION_MICRO "70")
0007 set(KTP_AUTH_HANDLER_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0008 
0009 project(ktp-auth-handler VERSION ${KTP_AUTH_HANDLER_VERSION})
0010 
0011 find_package(Qt5 5.3 CONFIG REQUIRED COMPONENTS DBus Gui Core Network) #Network for QSsl
0012 
0013 find_package(ECM 1.6.0 REQUIRED NO_MODULE)
0014 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
0015 
0016 find_package(KF5 5.0 REQUIRED COMPONENTS Wallet WidgetsAddons I18n KIO)
0017 
0018 find_package (TelepathyQt5 0.8.9 REQUIRED)
0019 find_package (KTp REQUIRED)
0020 find_package (Qca-qt5 REQUIRED)
0021 find_package(AccountsQt5 1.10 REQUIRED CONFIG)
0022 find_package(SignOnQt5 8.55 REQUIRED CONFIG)
0023 find_package(KAccounts REQUIRED)
0024 
0025 # include (MacroLibrary)
0026 #
0027 # macro_log_feature(ACCOUNTSQT_FOUND "AccountsQt" "Support for Accounts-SSO" "https://code.google.com/p/accounts-sso/source/checkout?repo=libaccounts-qt" FALSE "" "")
0028 # macro_log_feature(SIGNONQT_FOUND "SignonsQt" "Support for Accounts-SSO" "https://code.google.com/p/accounts-sso/source/checkout?repo=signond" FALSE "" "")
0029 # macro_display_feature_log()
0030 message("-----------------------------------------------------------------------------")
0031 message("IMPORTANT: There is a runtime dependency on QCA-OSSL. ")
0032 message("This project will build, but will fail to run properly. Please ensure it is installed.")
0033 message("If you are a packager you _must_ mark this as a dependency.")
0034 message("-----------------------------------------------------------------------------")
0035 
0036 find_package(Qca-qt5-ossl QUIET)
0037 set_package_properties(Qca-qt5-ossl PROPERTIES
0038          PURPOSE "Runtime-only dependency on the OSSL plugin of QCA for authentication to work properly"
0039          TYPE RUNTIME
0040          )
0041 
0042 include(KDEInstallDirs)
0043 include(KDECMakeSettings)
0044 include(KDECompilerSettings NO_POLICY_SCOPE)
0045 include(ECMMarkNonGuiExecutable)
0046 include(CMakePackageConfigHelpers)
0047 include(FeatureSummary)
0048 
0049 include_directories (${QCA_INCLUDE_DIR}
0050                      ${ACCOUNTSQT_INCLUDE_DIRS}
0051                      ${SIGNONQT_INCLUDE_DIRS}
0052 )
0053 
0054 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
0055 
0056 set(ktp_auth_handler_SRCS
0057     main.cpp
0058     sasl-handler.cpp
0059     sasl-auth-op.cpp
0060     tls-cert-verifier-op.cpp
0061     tls-handler.cpp
0062     types.cpp
0063     x-telepathy-password-auth-operation.cpp
0064     x-telepathy-password-prompt.cpp
0065     x-telepathy-sso-google-operation.cpp
0066     conference-auth-op.cpp
0067     conference-auth-observer.cpp
0068 )
0069 
0070 set(ktp_auth_handler_LIBS
0071     KTp::CommonInternals
0072     qca-qt5
0073     ${ACCOUNTSQT_LIBRARIES}
0074     ${SIGNONQT_LIBRARIES}
0075     KAccounts
0076     KF5::WidgetsAddons
0077     KF5::Wallet
0078     KF5::I18n
0079     KF5::KIOCore
0080     KF5::KIOWidgets
0081     Qt5::Core
0082     Qt5::DBus
0083 )
0084 
0085 configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
0086 
0087 ki18n_wrap_ui(ktp_auth_handler_SRCS x-telepathy-password-prompt.ui)
0088 add_executable(ktp-auth-handler ${ktp_auth_handler_SRCS})
0089 
0090 target_link_libraries(ktp-auth-handler
0091     ${ktp_auth_handler_LIBS}
0092 )
0093 
0094 configure_file(org.freedesktop.Telepathy.Client.KTp.SASLHandler.service.in
0095                ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.KTp.SASLHandler.service)
0096 configure_file(org.freedesktop.Telepathy.Client.KTp.TLSHandler.service.in
0097                ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.KTp.TLSHandler.service)
0098 
0099 configure_file(org.freedesktop.Telepathy.Client.KTp.ConfAuthObserver.service.in
0100     ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.KTp.ConfAuthObserver.service)
0101 
0102 install(TARGETS ktp-auth-handler DESTINATION ${KDE_INSTALL_LIBEXECDIR})
0103 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.KTp.SASLHandler.service
0104     ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.KTp.ConfAuthObserver.service
0105         DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
0106 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.KTp.TLSHandler.service
0107         DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
0108 install(FILES KTp.SASLHandler.client DESTINATION ${KDE_INSTALL_DATAROOTDIR}/telepathy/clients/)
0109 install(FILES KTp.TLSHandler.client DESTINATION ${KDE_INSTALL_DATAROOTDIR}/telepathy/clients/)
0110 install(FILES KTp.ConfAuthObserver.client DESTINATION ${KDE_INSTALL_DATAROOTDIR}/telepathy/clients/)
0111 
0112 ki18n_install(po)