diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-02 01:48:38 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-02 02:41:24 +0200 |
commit | 3eeae12c498d1a4dbe969462d2ba841f77ee3ccb (patch) | |
tree | ff8eab35e732bc0749fc11677c8873a7b3a58704 /CMake/Modules/FindLibIntl.cmake | |
download | manaplus-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.gz manaplus-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.bz2 manaplus-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.xz manaplus-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.zip |
Initial commit.
This code based on mana client http://www.gitorious.org/mana/mana
and my private repository.
Diffstat (limited to 'CMake/Modules/FindLibIntl.cmake')
-rw-r--r-- | CMake/Modules/FindLibIntl.cmake | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/CMake/Modules/FindLibIntl.cmake b/CMake/Modules/FindLibIntl.cmake new file mode 100644 index 000000000..e75960525 --- /dev/null +++ b/CMake/Modules/FindLibIntl.cmake @@ -0,0 +1,46 @@ +# Try to find the libintl library. Explicit searching is currently +# only required for Win32, though it might be useful for some UNIX +# variants, too. Therefore code for searching common UNIX include +# directories is included, too. +# +# Once done this will define +# +# LIBINTL_FOUND - system has libintl +# LIBINTL_LIBRARIES - the library needed for linking + +IF (LibIntl_LIBRARY) + SET(LibIntl_FIND_QUIETLY TRUE) +ENDIF () + +# for Windows we rely on the environement variables +# %INCLUDE% and %LIB%; FIND_LIBRARY checks %LIB% +# automatically on Windows +IF(WIN32) + FIND_LIBRARY(LibIntl_LIBRARY + NAMES intl + ) +ELSE() + FIND_LIBRARY(LibIntl_LIBRARY + NAMES intl + PATHS /usr/lib /usr/local/lib + ) +ENDIF() + +IF (LibIntl_LIBRARY) + SET(LIBINTL_FOUND TRUE) + SET(LIBINTL_LIBRARIES ${LibIntl_LIBRARY}) +ELSE () + SET(LIBINTL_FOUND FALSE) +ENDIF () + +IF (LIBINTL_FOUND) + IF (NOT LibIntl_FIND_QUIETLY) + MESSAGE(STATUS "Found libintl: ${LibIntl_LIBRARY}") + ENDIF () +ELSE () + IF (LibIntl_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find libintl") + ENDIF () +ENDIF () + +MARK_AS_ADVANCED(LibIntl_LIBRARY) |