diff options
| author | Harald Sitter <sitter@kde.org> | 2017-04-20 15:28:19 +0200 | 
|---|---|---|
| committer | Harald Sitter <sitter@kde.org> | 2017-04-20 17:04:29 +0200 | 
| commit | 77623d19b627cfa53a319145cafc11c79b54f00c (patch) | |
| tree | d8688166631a7e91d303aaeb5eaa2653cc288e35 | |
| parent | a45320e893f540a5df1a9b96a32e4de20a1b6601 (diff) | |
| download | extra-cmake-modules-77623d19b627cfa53a319145cafc11c79b54f00c.tar.gz extra-cmake-modules-77623d19b627cfa53a319145cafc11c79b54f00c.tar.bz2 | |
adapt to fetchpo changes and use vars for target directories to dry code
Summary:
- fetchpo now expects the output dirs as named arguments
- new argument for poqm directories where releaseme will put _qt.po files
- variables for both po/ and poqm/ to not repeat the paths all over the
  place
Reviewers: apol
Reviewed By: apol
Subscribers: #frameworks, #build_system
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D5525
| -rw-r--r-- | kde-modules/KDECMakeSettings.cmake | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake index 818305d4..ac1212cc 100644 --- a/kde-modules/KDECMakeSettings.cmake +++ b/kde-modules/KDECMakeSettings.cmake @@ -320,15 +320,24 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/po AND NOT TARGET fetch-translations)          COMMENT "Fetching releaseme scripts to download translations..."      ) +    set(_l10n_po_dir "${CMAKE_BINARY_DIR}/po") +    set(_l10n_poqm_dir "${CMAKE_BINARY_DIR}/poqm") +      if(CMAKE_VERSION VERSION_GREATER 3.2) -        set(extra BYPRODUCTS "${CMAKE_BINARY_DIR}/po") +        set(extra BYPRODUCTS ${_l10n_po_dir} ${_l10n_poqm_dir})      endif()      add_custom_target(fetch-translations ${_EXTRA_ARGS}          COMMENT "Downloading translations for ${_reponame} branch ${KDE_L10N_BRANCH}..."          COMMAND git -C "${CMAKE_BINARY_DIR}/releaseme" pull -        COMMAND cmake -E remove_directory ${CMAKE_BINARY_DIR}/po -        COMMAND ruby "${CMAKE_BINARY_DIR}/releaseme/fetchpo.rb" --origin ${KDE_L10N_BRANCH} --project "${_reponame}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/po" +        COMMAND cmake -E remove_directory ${_l10n_po_dir} +        COMMAND cmake -E remove_directory ${_l10n_poqm_dir} +        COMMAND ruby "${CMAKE_BINARY_DIR}/releaseme/fetchpo.rb" +            --origin ${KDE_L10N_BRANCH} +            --project "${_reponame}" +            --output-dir "${_l10n_po_dir}" +            --output-poqm-dir "${_l10n_poqm_dir}" +            "${CMAKE_CURRENT_SOURCE_DIR}"          ${extra}          DEPENDS "${CMAKE_BINARY_DIR}/releaseme"      ) | 
