Improve multi (#7136)
[opentx.git] / radio / src / translations / CMakeLists.txt
blob5861862e3d3141e76cf99adb9d97ff8b1850926b
1 file(GLOB translations *.h.txt)
2 foreach(translation ${translations})
3   get_filename_component(language ${translation} NAME_WE)
4   get_filename_component(path ${translation} DIRECTORY)
5   set(target ${language}.h)
6   if(NOT(PCB STREQUAL X12S OR PCB STREQUAL X10) AND language STREQUAL "cz")
7     set(language cz_reduced)
8   endif()
9   if(PYTHONINTERP_FOUND)
10     add_custom_command(
11       OUTPUT ${target}
12       COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/translate.py ${translation} ${target} ${language}
13       DEPENDS ${translation}
14       )
15   endif()
16   list(APPEND translations_files ${target})
17 endforeach()
19 add_custom_target(firmware_translations DEPENDS ${translations_files})