diff options
author | Brad King <brad.king@kitware.com> | 2017-08-30 14:41:33 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-08-30 14:42:31 (GMT) |
commit | 0ea6aee8905af1a8d3ee4d7af88c4b3a40aafe10 (patch) | |
tree | 2865998929ea1badc5606c1212d60c851606d9ad /Modules | |
parent | b1d072f5b01451042dcdf1cf469a0ed3af7dfb94 (diff) | |
parent | fb3a608f1ab4a8fda04d5c2fb5ad99e396ebd1e6 (diff) | |
download | CMake-0ea6aee8905af1a8d3ee4d7af88c4b3a40aafe10.zip CMake-0ea6aee8905af1a8d3ee4d7af88c4b3a40aafe10.tar.gz CMake-0ea6aee8905af1a8d3ee4d7af88c4b3a40aafe10.tar.bz2 |
Merge topic 'gettext-windows'
fb3a608f FindGettext: fix support for MS Windows gettext binaries
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1192
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindGettext.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake index 8035507..9623b85 100644 --- a/Modules/FindGettext.cmake +++ b/Modules/FindGettext.cmake @@ -66,10 +66,14 @@ if(GETTEXT_MSGMERGE_EXECUTABLE) OUTPUT_VARIABLE gettext_version ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) - if (gettext_version MATCHES "^msgmerge \\([^\\)]*\\) ([0-9\\.]+[^ \n]*)") - set(GETTEXT_VERSION_STRING "${CMAKE_MATCH_1}") + get_filename_component(msgmerge_name ${GETTEXT_MSGMERGE_EXECUTABLE} NAME) + get_filename_component(msgmerge_namewe ${GETTEXT_MSGMERGE_EXECUTABLE} NAME_WE) + if (gettext_version MATCHES "^(${msgmerge_name}|${msgmerge_namewe}) \\([^\\)]*\\) ([0-9\\.]+[^ \n]*)") + set(GETTEXT_VERSION_STRING "${CMAKE_MATCH_2}") endif() unset(gettext_version) + unset(msgmerge_name) + unset(msgmerge_namewe) endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) |