From 265c67f173d4819c786d14ccdd6e3bc539c6fa80 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 24 Mar 2018 08:09:42 +0100 Subject: [PATCH] Require KF518n only with downloaded translations --- CMakeLists.txt | 6 ++++-- src/main/CMakeLists.txt | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ef699c26..abee24ab7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,8 +86,10 @@ endif() # Mandatory: OpenSSL find_package(OpenSSL REQUIRED) -# Mandatory: KF5I18n (only for ki18n_install) -find_package(KF5I18n REQUIRED) +# KF5I18n: Mandatory with downloaded translations (only for ki18n_install) +if (EXISTS "${CMAKE_SOURCE_DIR}/po") + find_package(KF5I18n REQUIRED) +endif() # Optional: GnomeKeyring find_package(PkgConfig) diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt index ec6bb5076..b887e8cf9 100644 --- a/src/main/CMakeLists.txt +++ b/src/main/CMakeLists.txt @@ -32,7 +32,9 @@ endif() if (UNIX AND NOT APPLE) install(TARGETS falkon ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/falkon) - ki18n_install(${CMAKE_SOURCE_DIR}/po) + if (KF5I18n_FOUND) + ki18n_install(${CMAKE_SOURCE_DIR}/po) + endif() ecm_install_po_files_as_qm(${CMAKE_SOURCE_DIR}/poqm) install(PROGRAMS ../../linux/applications/org.kde.falkon.desktop DESTINATION ${KDE_INSTALL_APPDIR})