aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-07-21 14:50:15 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-07-21 14:50:15 +0200
commit9fa4b72a4752795962b0d17c485de92fdbd029fc (patch)
tree8ee59642326e998fe5c9916d26436ba016bf18ea
parent3e78b29cae00b763e3350bccb27ad48ec3141ef5 (diff)
downloadminetest-9fa4b72a4752795962b0d17c485de92fdbd029fc.tar.gz
minetest-9fa4b72a4752795962b0d17c485de92fdbd029fc.tar.bz2
minetest-9fa4b72a4752795962b0d17c485de92fdbd029fc.zip
Find correct library for MSVC vs MingW in Winows
-rw-r--r--cmake/Modules/FindGettextLib.cmake9
-rw-r--r--src/CMakeLists.txt4
2 files changed, 8 insertions, 5 deletions
diff --git a/cmake/Modules/FindGettextLib.cmake b/cmake/Modules/FindGettextLib.cmake
index 3fb391e65..1bc92708a 100644
--- a/cmake/Modules/FindGettextLib.cmake
+++ b/cmake/Modules/FindGettextLib.cmake
@@ -20,8 +20,15 @@ FIND_PROGRAM(GETTEXT_MSGFMT
# they do not because gettext is part of glibc
# TODO check the requirements on other BSDs and older Linux
IF (WIN32)
+ IF(MSVC)
+ SET(GETTEXT_LIB_NAMES
+ libintl.lib intl.lib libintl3.lib intl3.lib)
+ ELSE()
+ SET(GETTEXT_LIB_NAMES
+ libintl.dll.a intl.dll.a libintl3.dll.a intl3.dll.a)
+ ENDIF()
FIND_LIBRARY(GETTEXT_LIBRARY
- NAMES libintl.lib intl.lib libintl3.lib intl3.lib
+ NAMES ${GETTEXT_LIB_NAMES}
PATHS "${CUSTOM_GETTEXT_PATH}/lib"
DOC "gettext *intl*.lib")
FIND_LIBRARY(GETTEXT_DLL
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6cc5c035f..c018d8e56 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -235,10 +235,6 @@ else()
set(ARCH i386)
endif()
- if(WIN32 AND USE_GETTEXT)
- set(CMAKE_EXE_LINKER_FLAGS "-l${GETTEXT_LIBRARY}")
- endif()
-
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} -O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O1 -Wall ${WARNING_FLAGS}")