Warning, /system/ubiquity-slideshow-neon/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 project(ubiqity-slideshow-neon) 0002 0003 cmake_minimum_required(VERSION 3.0) 0004 0005 find_package(ECM 5.0) 0006 0007 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_PATH}) 0008 0009 include(KDEInstallDirs) 0010 include(KDECMakeSettings) 0011 include(KDECompilerSettings NO_POLICY_SCOPE) 0012 include(FeatureSummary) 0013 0014 find_package(Qt5 5.12 REQUIRED COMPONENTS Core Qml) 0015 find_package(KF5 5.57 REQUIRED COMPONENTS I18n Declarative) 0016 0017 function(LANGUAGE_FROM_PO VAR pofile) 0018 get_filename_component(_lang ${pofile} DIRECTORY) 0019 get_filename_component(_lang ${_lang} NAME) 0020 set(${VAR} ${_lang} PARENT_SCOPE) 0021 endfunction() 0022 0023 function(TRANSLATE_HTML_POFILE pofile) 0024 set(translated_files) 0025 0026 language_from_po(language ${pofile}) 0027 0028 foreach(master_slide ${master_slides}) 0029 get_filename_component(htmlname ${master_slide} NAME) 0030 set(translated_file ${CMAKE_CURRENT_BINARY_DIR}/l10n/${language}/${htmlname}) 0031 add_custom_command( 0032 OUTPUT ${translated_file} 0033 COMMAND po4a-translate 0034 --format xhtml 0035 --master ${master_slide} 0036 --po ${pofile} 0037 --localized ${translated_file} 0038 --keep 0 # Generate the translation regardless of completion. Otherwise we'd be missing files. 0039 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" 0040 DEPENDS ${pofile} ${master_slide}) 0041 install(FILES ${translated_file} DESTINATION /usr/share/ubiquity-slideshow/slides/l10n/${language}/) 0042 list(APPEND translated_files ${translated_file}) 0043 endforeach() 0044 0045 # Sanitize ca@valencia style languages to be usable as targets names. 0046 string(REPLACE "@" "-" safe_language ${language}) 0047 add_custom_target(translated-html-${safe_language} ALL DEPENDS ${translated_files}) 0048 add_dependencies(translated-html translated-html-${safe_language}) 0049 endfunction() 0050 0051 function(TRANSLATE_HTML) 0052 file(GLOB master_slides ubiquity-slideshow/slides/*.html) 0053 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/l10n) 0054 0055 add_custom_target(translated-html ALL) 0056 file(GLOB_RECURSE pofiles po/*.po) 0057 foreach(pofile ${pofiles}) 0058 translate_html_pofile(${pofile}) 0059 endforeach() 0060 endfunction() 0061 0062 TRANSLATE_HTML() 0063 0064 add_custom_target(directory.jsonp ALL 0065 DEPENDS translated-html 0066 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-directory-jsonp.py ${CMAKE_CURRENT_BINARY_DIR}/l10n > ${CMAKE_CURRENT_BINARY_DIR}/directory.jsonp) 0067 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/directory.jsonp DESTINATION /usr/share/ubiquity-slideshow/slides/) 0068 0069 install(DIRECTORY ubiquity-slideshow DESTINATION /usr/share) 0070 0071 add_subdirectory(calamares-qml-plugin) 0072 0073 if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") 0074 ki18n_install(po) 0075 endif() 0076 0077 file(GLOB QML_SRCS ubiquity-slideshow/slides/*.qml) 0078 add_custom_target(QmlFiles ALL echo SOURCES ${QML_SRCS}) 0079 0080 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)