<div class="gmail_quote">On Fri, Apr 3, 2009 at 10:03 PM, Naram Qashat <span dir="ltr">&lt;<a href="mailto:cyberbotx@cyberbotx.com">cyberbotx@cyberbotx.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On the project I&#39;m working on, one of the developers expressed interest in utilizing gettext to handle internationalization and localization.  I found that CMake 2.6.0 and newer have a FindGettext.cmake module which would allow us to utilize gettext for this.  However, I&#39;ve made our CMake build files able to function under CMake 2.4.x as well, due to our users compiling our software on shells that may not have the latest CMake, and there is no FindGettext.cmake with those versions.  Is it possible to include FindGettext.cmake in the root directory of my project and utilize that if CMake 2.4.x is used?</blockquote>
<div><br>Naram,<br><br>Yes.  You can set CMAKE_MODULE_PATH conditionally based on the value of CMAKE_MAJOR_VERSION &amp; CMAKE_MINOR_VERSION.<br><br>If you&#39;ve never used CMAKE_MODULE_PATH before I should warn you like most CMake variables, it doesn&#39;t understand relative paths.  You must use variables like ${PROJECT_SOURCE_DIR} or ${CMAKE_CURRENT_SOURCE_DIR}.<br>
<br>Also, in general if you want to backport modules from 2.6.x to 2.4.x you have to take into account the HINTS option to find_package() and calls to include(FindPackageHandleStandardArgs) both of which were added in 2.6.x.  It appears that the FindGetText.cmake hasn&#39;t been updated to use these yet so using it with CMake 2.4 looks like it should be fairly easy.<br>
</div></div><br>-- <br>Philip Lowman<br>