diff options
author | Diogo Pereira <sir.suriv@gmail.com> | 2016-08-18 05:17:16 +0300 |
---|---|---|
committer | Diogo Pereira <sir.suriv@gmail.com> | 2016-08-18 05:17:16 +0300 |
commit | 31ece3628e06b73203cec0d2914729dfb24f56db (patch) | |
tree | b798c2c19c22b1e160bb7a7e9c5a1b05bc2ce79b /cmake | |
parent | 89ddba12d7b06a6dbde593be5bbfaa299e91d5ac (diff) |
Revert "Manually merged gettext PR #178 by @hasufell"
This reverts commit 67a38b06132bf1b875ca0ab53b5477cce046da2e.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/GETTEXT.cmake | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/cmake/GETTEXT.cmake b/cmake/GETTEXT.cmake index 1cf000175..e3056f8cd 100644 --- a/cmake/GETTEXT.cmake +++ b/cmake/GETTEXT.cmake @@ -14,27 +14,17 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. find_suggested_package(Gettext) - function(gettext po_dir package_name) - # check if LINGUAS env var is unset - execute_process(COMMAND sh -c "echo -n \${LINGUAS+x}" - OUTPUT_VARIABLE UNSETLINGUAS) set(mo_files) file(GLOB po_files ${po_dir}/*.po) foreach(po_file ${po_files}) get_filename_component(lang ${po_file} NAME_WE) set(mo_file ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) - if($ENV{LINGUAS} MATCHES "^.*${lang}.*$" OR "${UNSETLINGUAS}" STREQUAL "") - set(mo_file ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) - add_custom_command(OUTPUT ${mo_file} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo_file} ${po_file} DEPENDS ${po_file}) - install(FILES ${mo_file} DESTINATION share/locale/${lang}/LC_MESSAGES RENAME ${package_name}.mo) - set(mo_files ${mo_files} ${mo_file}) - endif() add_custom_command(OUTPUT ${mo_file} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo_file} ${po_file} DEPENDS ${po_file}) install(FILES ${mo_file} DESTINATION share/locale/${lang}/LC_MESSAGES RENAME ${package_name}.mo) set(mo_files ${mo_files} ${mo_file}) |