From f20bac996da46556a821c1b0244a202e652fe247 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 30 May 2014 15:45:57 -0400 Subject: Fix Windows build and update library names to the newer ones. Also fix crash on Windows when unloading a module because it threw an exception. --- modules/CMakeLists.txt | 2 +- modules/extra/m_ldap.cpp | 1 + modules/extra/m_mysql.cpp | 7 ++++++- modules/extra/m_regex_pcre.cpp | 1 + modules/extra/m_sasl_dh-aes.cpp | 1 + modules/extra/m_sasl_dh-blowfish.cpp | 1 + modules/extra/m_sqlite.cpp | 1 + modules/extra/m_ssl_gnutls.cpp | 1 + modules/extra/m_ssl_openssl.cpp | 1 + 9 files changed, 14 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index e9afbf45b..26af2745e 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -50,7 +50,7 @@ macro(build_modules SRC) add_library(${SO} MODULE ${MODULE_SRC}) # Windows requires this because it's weird if(WIN32) - set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\"") + set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\" /OPT:NOREF") else(WIN32) set(WIN32_NO_LIBS) endif(WIN32) diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 7dc6bc038..755187b25 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -1,4 +1,5 @@ /* RequiredLibraries: ldap,lber */ +/* RequiredWindowsLibraries: libldap,liblber */ #include "module.h" #include "modules/ldap.h" diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index ceb7af0ef..de8ed4f7d 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -1,9 +1,14 @@ /* RequiredLibraries: mysqlclient */ +/* RequiredWindowsLibraries: libmysql */ #include "module.h" #include "modules/sql.h" #define NO_CLIENT_LONG_LONG -#include +#ifdef WIN32 +# include +#else +# include +#endif using namespace SQL; diff --git a/modules/extra/m_regex_pcre.cpp b/modules/extra/m_regex_pcre.cpp index b6bf88af1..7cbde87db 100644 --- a/modules/extra/m_regex_pcre.cpp +++ b/modules/extra/m_regex_pcre.cpp @@ -1,4 +1,5 @@ /* RequiredLibraries: pcre */ +/* RequiredWindowsLibraries: libpcre */ #include "module.h" #include diff --git a/modules/extra/m_sasl_dh-aes.cpp b/modules/extra/m_sasl_dh-aes.cpp index a4fc5ea44..d556e8502 100644 --- a/modules/extra/m_sasl_dh-aes.cpp +++ b/modules/extra/m_sasl_dh-aes.cpp @@ -1,4 +1,5 @@ /* RequiredLibraries: ssl,crypto */ +/* RequiredWindowsLibraries: ssleay32,libeay32 */ #include "module.h" #include "modules/sasl.h" diff --git a/modules/extra/m_sasl_dh-blowfish.cpp b/modules/extra/m_sasl_dh-blowfish.cpp index 1bfd50173..df55f06ea 100644 --- a/modules/extra/m_sasl_dh-blowfish.cpp +++ b/modules/extra/m_sasl_dh-blowfish.cpp @@ -1,4 +1,5 @@ /* RequiredLibraries: ssl,crypto */ +/* RequiredWindowsLibraries: ssleay32,libeay32 */ #include "module.h" #include "modules/sasl.h" diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index b306ccfcf..86f21667a 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -1,4 +1,5 @@ /* RequiredLibraries: sqlite3 */ +/* RequiredWindowsLibraries: sqlite3 */ #include "module.h" #include "modules/sql.h" diff --git a/modules/extra/m_ssl_gnutls.cpp b/modules/extra/m_ssl_gnutls.cpp index 011530280..d391b6f5b 100644 --- a/modules/extra/m_ssl_gnutls.cpp +++ b/modules/extra/m_ssl_gnutls.cpp @@ -7,6 +7,7 @@ */ /* RequiredLibraries: gnutls */ +/* RequiredWindowsLibraries: libgnutls-28 */ #include "module.h" #include "modules/ssl.h" diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index a274dc78d..ebf88ad63 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -1,4 +1,5 @@ /* RequiredLibraries: ssl,crypto */ +/* RequiredWindowsLibraries: ssleay32,libeay32 */ #include "module.h" #include "modules/ssl.h" -- cgit