diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-07-16 14:34:40 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-07-16 14:34:40 +0200 | 
| commit | 33ac92cd1a52b487f84b1c0eee81d654fbf37033 (patch) | |
| tree | 1bafe5e6f2c9b07c117a6bd490ba4afc3fb7575d | |
| parent | fcc4085f7867fe2976e9e77555de6521bcccef9c (diff) | |
cmake: install existing i18n files when update disabled
That was never intended.
| -rw-r--r-- | cmake/opentrack-boilerplate.cmake | 18 | ||||
| -rw-r--r-- | cmake/opentrack-install.cmake | 4 | 
2 files changed, 10 insertions, 12 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index e2db495b..2b20e8ed 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -110,14 +110,16 @@ function(otr_i18n_for_target_directory n)      set(k "opentrack-${n}")      foreach(i ${opentrack_all-translations})          set(t "${CMAKE_CURRENT_SOURCE_DIR}/lang/${i}.ts") -        add_custom_command(OUTPUT "${t}" -            COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/lang" -            COMMAND "${Qt5_DIR}/../../../bin/lupdate" -silent -recursive -no-obsolete -locations relative . -ts "${t}" -            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" -            DEPENDS ${${k}-cc} ${${k}-hh} ${${k}-ui} ${${k}-rc} -            COMMENT "Running lupdate for ${n}/${i}") -        set(target-name "i18n-lang-${i}-module-${n}") -        add_custom_target(${target-name} DEPENDS "${t}") +        if(NOT opentrack_disable-i18n-update) +            add_custom_command(OUTPUT "${t}" +                COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/lang" +                COMMAND "${Qt5_DIR}/../../../bin/lupdate" -silent -recursive -no-obsolete -locations relative . -ts "${t}" +                WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" +                DEPENDS ${${k}-cc} ${${k}-hh} ${${k}-ui} ${${k}-rc} +                COMMENT "Running lupdate for ${n}/${i}") +            set(target-name "i18n-lang-${i}-module-${n}") +            add_custom_target(${target-name} DEPENDS "${t}") +        endif()          set_property(GLOBAL APPEND PROPERTY "opentrack-ts-files-${i}" "${t}")      endforeach()  endfunction() diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake index 750b47cf..0530c5d9 100644 --- a/cmake/opentrack-install.cmake +++ b/cmake/opentrack-install.cmake @@ -65,10 +65,6 @@ function(merge_translations)              endif()          endforeach() -        if (opentrack_disable-i18n-update) -            set(ts-files_ "") -        endif() -          if(NOT ".${ts-files_}" STREQUAL ".")              set(qm-output "${CMAKE_CURRENT_BINARY_DIR}/${i}.qm")              list(APPEND all-qm-files "${qm-output}")  | 
