diff options
| author | Laurent Montel <montel@kde.org> | 2007-03-17 21:54:24 +0000 | 
|---|---|---|
| committer | Laurent Montel <montel@kde.org> | 2007-03-17 21:54:24 +0000 | 
| commit | 0dd53f4284145542c06aec0e4a2ff2b7b45c17b7 (patch) | |
| tree | f5dbbb0b300650d48251dccf904bc5b04e3f6bad | |
| parent | 6a15214db07ebf00ef41aff74bdce220aa387dea (diff) | |
| download | extra-cmake-modules-0dd53f4284145542c06aec0e4a2ff2b7b45c17b7.tar.gz extra-cmake-modules-0dd53f4284145542c06aec0e4a2ff2b7b45c17b7.tar.bz2  | |
Add a cmake macro to search msgfmt program (need to 
generate po file)
svn path=/trunk/KDE/kdelibs/; revision=643591
| -rw-r--r-- | modules/FindMsgfmt.cmake | 26 | 
1 files changed, 26 insertions, 0 deletions
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 <montel@kde.org> +# +# 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) +  | 
