|
From: Lasse Kärkkäi. <tr...@us...> - 2009-12-12 14:28:59
|
Module: performous
Branch: master
Commit: c0cf22a77bddd9079e8a29e56a153e4accc136de
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Dec 12 16:28:47 2009 +0200
Fix FindGettext.cmake; rename HAVE_* defines to USE_*
---
cmake/Modules/FindGettext.cmake | 18 +++++++++++-------
game/CMakeLists.txt | 4 ++--
game/i18n.hh | 2 +-
game/joystick.cc | 2 +-
4 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/cmake/Modules/FindGettext.cmake b/cmake/Modules/FindGettext.cmake
index 713b150..b25512c 100644
--- a/cmake/Modules/FindGettext.cmake
+++ b/cmake/Modules/FindGettext.cmake
@@ -10,18 +10,22 @@
include(LibFindMacros)
-libfind_pkg_check_modules(Gettext_PKGCONF Gettext)
+# On Linux there is no pkgconfig script and gettext is part of glibc
+if(WIN32)
+ libfind_pkg_check_modules(Gettext_PKGCONF Gettext)
+
+ find_library(Gettext_LIBRARY
+ NAMES libintl
+ PATHS ${Gettext_PKGCONF_LIBRARY_DIRS}
+ )
+ set(Gettext_PROCESS_LIBS Gettext_LIBRARY)
+endif()
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)
+
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index e7e8ef0..7c411c9 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -31,7 +31,7 @@ find_package(Gettext)
if(Gettext_FOUND)
include_directories(${Gettext_INCLUDE_DIRS})
list(APPEND LIBS ${Gettext_LIBRARIES})
- add_definitions("-DHAVE_GETTEXT")
+ add_definitions("-DUSE_GETTEXT")
message(STATUS "Internationalization: Enabled")
else()
message(STATUS "Internationalization: Disabled (libintl not found)")
@@ -41,7 +41,7 @@ find_package(PortMidi)
if(PortMidi_FOUND)
include_directories(${PortMidi_INCLUDE_DIRS})
list(APPEND LIBS ${PortMidi_LIBRARIES})
- add_definitions("-DHAVE_PORTMIDI")
+ add_definitions("-DUSE_PORTMIDI")
message(STATUS "MIDI I/O: Enabled")
else()
message(STATUS "MIDI I/O: Disabled (libportmidi not found)")
diff --git a/game/i18n.hh b/game/i18n.hh
index 83c74f1..27543bc 100644
--- a/game/i18n.hh
+++ b/game/i18n.hh
@@ -1,6 +1,6 @@
#pragma once
-#ifdef HAVE_GETTEXT
+#ifdef USE_GETTEXT
/* Internationalization Dependances */
#include <libintl.h>
#include <locale.h>
diff --git a/game/joystick.cc b/game/joystick.cc
index d0105fe..f73785e 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -3,7 +3,7 @@
#include <boost/lexical_cast.hpp>
-#ifdef HAVE_PORTMIDI
+#ifdef USE_PORTMIDI
input::MidiDrums::MidiDrums(int devId): stream(devId) {
Private::devices[0x8000] = Private::InputDevPrivate(Private::DRUMS_MIDI);
event.type = Event::PRESS;
|