|
From: Tapio V. <aa...@us...> - 2009-12-11 12:45:29
|
Module: performous Branch: dance Commit: 69e5e4e13bdd2ebd647cd57212c0ba321d60e477 Author: Xaldyz <xa...@us...> Date: Sun Dec 6 21:18:00 2009 +0100 Solved include problems of gettext under Windows --- cmake/Modules/FindGettext.cmake | 27 +++++++++++++++++++++++++++ game/CMakeLists.txt | 2 +- 2 files changed, 28 insertions(+), 1 deletions(-) diff --git a/cmake/Modules/FindGettext.cmake b/cmake/Modules/FindGettext.cmake new file mode 100644 index 0000000..63c92f0 --- /dev/null +++ b/cmake/Modules/FindGettext.cmake @@ -0,0 +1,27 @@ +# - Try to find Gettext +# Once done, this will define +# +# Gettext_FOUND - system has Gettext +# Gettext_INCLUDE_DIRS - the Gettext include directories +# Gettext_LIBRARIES - link these to use Gettext +# +# See documentation on how to write CMake scripts at +# http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries + +include(LibFindMacros) + +libfind_pkg_check_modules(Gettext_PKGCONF Gettext) + +find_path(Gettext_INCLUDE_DIR + NAMES libintl.h + PATHS ${Gettext_PKGCONF_INCLUDE_DIRS} +) + +find_library(Gettext_LIBRARY + NAMES libintl + PATHS ${Gettext_PKGCONF_LIBRARY_DIRS} +) + +set(Gettext_PROCESS_INCLUDES Gettext_INCLUDE_DIR) +set(Gettext_PROCESS_LIBS Gettext_LIBRARY) +libfind_process(Gettext) \ No newline at end of file diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt index 4e48a6c..816e4c5 100644 --- a/game/CMakeLists.txt +++ b/game/CMakeLists.txt @@ -20,7 +20,7 @@ else() endif() # Find all the libs that don't require extra parameters -foreach(lib ${OUR_LIBS} SDL PangoCairo LibRSVG LibXML++ Magick++ GLEW AVFormat SWScale OpenGL Z Jpeg Tiff Png) +foreach(lib ${OUR_LIBS} SDL PangoCairo LibRSVG LibXML++ Magick++ GLEW AVFormat SWScale OpenGL Z Jpeg Tiff Png Gettext) find_package(${lib} REQUIRED) include_directories(${${lib}_INCLUDE_DIRS}) list(APPEND LIBS ${${lib}_LIBRARIES}) |