From 0dd53f4284145542c06aec0e4a2ff2b7b45c17b7 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sat, 17 Mar 2007 21:54:24 +0000 Subject: Add a cmake macro to search msgfmt program (need to generate po file) svn path=/trunk/KDE/kdelibs/; revision=643591 --- modules/FindMsgfmt.cmake | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 modules/FindMsgfmt.cmake (limited to 'modules') diff --git a/modules/FindMsgfmt.cmake b/modules/FindMsgfmt.cmake new file mode 100644 index 00000000..309b8b92 --- /dev/null +++ b/modules/FindMsgfmt.cmake @@ -0,0 +1,26 @@ +# - Try to find msgfmt +# Once done this will define +# +# MSGFMT_FOUND - system has msgfmt +# +# Copyright (c) 2007, Montel Laurent +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(MSGFMT_EXECUTABLE) + set(MSGFMT_FOUND TRUE) +else(MSGFMT_EXECUTABLE) + + FIND_PROGRAM(MSGFMT_EXECUTABLE NAMES msgfmt PATHS /usr/local/bin ) + if (MSGFMT_EXECUTABLE) + set(MSGFMT_FOUND TRUE) + else (MSGFMT_EXECUTABLE) + if (Msgfmt_FIND_REQUIRED) + message(SEND_ERROR "Could NOT find msgfmt program") + endif (Msgfmt_FIND_REQUIRED) + endif (MSGFMT_EXECUTABLE) + MARK_AS_ADVANCED(MSGFMT_EXECUTABLE) + +endif (MSGFMT_EXECUTABLE) + -- cgit v1.2.1