mirror of
https://github.com/anope/anope.git
synced 2026-07-02 13:33:12 +02:00
Update FindGettext.cmake for new Windows stuff and fix language.cpp
compile
This commit is contained in:
+1
-5
@@ -86,11 +86,7 @@ if(WIN32)
|
||||
target_link_libraries(${PROGRAM_NAME} wsock32 Ws2_32 ${LINK_LIBS} ${GETTEXT_LIBRARIES} ${WIN32_MEMORY})
|
||||
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
|
||||
else(WIN32)
|
||||
if(GETTEXT_LIBRARIES)
|
||||
target_link_libraries(${PROGRAM_NAME} ${LINK_LIBS} ${GETTEXT_LIBRARIES})
|
||||
else(GETTEXT_LIBRARIES)
|
||||
target_link_libraries(${PROGRAM_NAME} ${LINK_LIBS})
|
||||
endif(GETTEXT_LIBRARIES)
|
||||
target_link_libraries(${PROGRAM_NAME} ${LINK_LIBS} ${GETTEXT_LIBRARIES})
|
||||
endif(WIN32)
|
||||
# Building the Anope executable requires the version.h header to be generated
|
||||
add_dependencies(${PROGRAM_NAME} headers)
|
||||
|
||||
@@ -76,8 +76,6 @@ const char *Language::Translate(const NickCore *nc, const char *string)
|
||||
|
||||
#if GETTEXT_FOUND
|
||||
|
||||
extern "C" int _nl_msg_cat_cntr;
|
||||
|
||||
const char *Language::Translate(const char *lang, const char *string)
|
||||
{
|
||||
if (!string || !*string)
|
||||
@@ -86,7 +84,6 @@ const char *Language::Translate(const char *lang, const char *string)
|
||||
if (!lang || !*lang)
|
||||
lang = Config->DefLanguage.c_str();
|
||||
|
||||
++_nl_msg_cat_cntr;
|
||||
#ifdef _WIN32
|
||||
SetThreadLocale(MAKELCID(MAKELANGID(WindowsGetLanguage(lang), SUBLANG_DEFAULT), SORT_DEFAULT));
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user