diff options
author | fiaxh <git@mx.ax.lt> | 2017-04-07 11:09:47 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-04-10 15:47:21 +0200 |
commit | 9bc83539d124f9645dc92e9e39001cb0192dae61 (patch) | |
tree | a4b22a8ea3e10b6d0050c2e5669729919a1cb477 /cmake/FindGettext.cmake | |
parent | d8881c4b16a1cd376dd69304c44444aee581da32 (diff) | |
download | dino-9bc83539d124f9645dc92e9e39001cb0192dae61.tar.gz dino-9bc83539d124f9645dc92e9e39001cb0192dae61.zip |
Gettext support
Diffstat (limited to 'cmake/FindGettext.cmake')
-rw-r--r-- | cmake/FindGettext.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/FindGettext.cmake b/cmake/FindGettext.cmake new file mode 100644 index 00000000..7d2d260c --- /dev/null +++ b/cmake/FindGettext.cmake @@ -0,0 +1,18 @@ +find_program(XGETTEXT_EXECUTABLE xgettext) +find_program(MSGMERGE_EXECUTABLE msgmerge) +find_program(MSGFMT_EXECUTABLE msgfmt) +find_program(MSGCAT_EXECUTABLE msgcat) + +if(XGETTEXT_EXECUTABLE) + execute_process(COMMAND ${XGETTEXT_EXECUTABLE} "--version" + OUTPUT_VARIABLE GETTEXT_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REGEX REPLACE "xgettext \\(GNU gettext-tools\\) ([0-9\\.]*).*" "\\1" GETTEXT_VERSION "${GETTEXT_VERSION}") +endif(XGETTEXT_EXECUTABLE) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Gettext + REQUIRED_VARS XGETTEXT_EXECUTABLE MSGMERGE_EXECUTABLE MSGFMT_EXECUTABLE MSGCAT_EXECUTABLE + VERSION_VAR GETTEXT_VERSION) + +set(GETTEXT_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/UseGettext.cmake")
\ No newline at end of file |