From d21d5a00679283e31fa7d5861743a179b0fb5f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 16 Jan 2019 14:22:47 +0100 Subject: [PATCH] Add tde_setup_msgfmt macro. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 6c8bd1332870202985febd59c55208f58f6f2a65) --- modules/TDEMacros.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index ff46a25..e2aea5e 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -1907,6 +1907,25 @@ macro( tde_setup_gcc_visibility ) endmacro( ) +################################################# +##### +##### tde_setup_msgfmt + +macro( tde_setup_msgfmt ) + if( NOT DEFINED MSGFMT_EXECUTABLE ) + include( FindGettext ) + if( GETTEXT_FOUND ) + set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE} + CACHE FILEPATH "path to msgfmt executable" ) + endif( GETTEXT_FOUND ) + + if( NOT MSGFMT_EXECUTABLE ) + tde_message_fatal( "msgfmt is required but was not found on your system." ) + endif( NOT MSGFMT_EXECUTABLE ) + endif( ) +endmacro( ) + + ################################################ ##### ##### Restore CMP0026 policy