aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kvilib/config/kvi_settings.h27
-rw-r--r--src/kvilib/ext/kvi_xlib.h34
-rw-r--r--src/kvilib/net/kvi_netutils.cpp3
-rw-r--r--src/kvirc/CMakeLists.txt10
-rw-r--r--src/kvirc/ui/kvi_cryptcontroller.h4
5 files changed, 44 insertions, 34 deletions
diff --git a/src/kvilib/config/kvi_settings.h b/src/kvilib/config/kvi_settings.h
index a61191a64..b9893b355 100644
--- a/src/kvilib/config/kvi_settings.h
+++ b/src/kvilib/config/kvi_settings.h
@@ -34,13 +34,21 @@
#include <QtGlobal>
+#ifdef KVIRC_EXTERNAL_MODULE
+ // when compiling an external module
+ // include the last configuration
+ #include "kvi_configstatus.h"
+#else
+ // assume CMake build system for all systems
+ #include "kvi_sysconfig.h"
+#endif
+
// FIXME: Once we have a stable CMake build system, this section needs a cleanup.
#if (defined(_OS_WIN32_) || defined(Q_OS_WIN32) || defined(Q_OS_WIN32_)) && !defined(MINGW)
#define COMPILE_WITH_SYSTEM_MEMMOVE
#define FEEL_LIKE_I_AM_COMPILING_UNDER_WINDOZE
#define COMPILE_ON_WINDOWS
- #define KVIRC_VERSION_RELEASE "COMPILED_WITH_VS"
#ifdef __KVILIB__
#define KVILIB_API __declspec(dllexport)
@@ -79,15 +87,6 @@
#define COMPILE_ON_MAC
#endif
- #ifdef KVIRC_EXTERNAL_MODULE
- // when compiling an external module
- // include the last configuration
- #include "kvi_configstatus.h"
- #else
- // assume CMake build system
- #include "kvi_sysconfig.h"
- #endif
-
#endif
#ifndef COMPILE_USE_QT4
@@ -96,11 +95,13 @@
#endif
#define KVI_VERSION KVIRC_VERSION_RELEASE
-#ifdef COMPILE_ON_WINDOWS
-#define KVI_VERSION_BRANCH "VS_BRANCH"
+
+#ifndef KVIRC_VERSION_BRANCH
+ #define KVI_VERSION_BRANCH "VS_BRANCH"
#else
-#define KVI_VERSION_BRANCH KVIRC_VERSION_BRANCH
+ #define KVI_VERSION_BRANCH KVIRC_VERSION_BRANCH
#endif
+
#define KVI_RELEASE_NAME "Insomnia"
#ifndef COMPILE_ON_WINDOWS
diff --git a/src/kvilib/ext/kvi_xlib.h b/src/kvilib/ext/kvi_xlib.h
index 53c0a879d..ee44b8829 100644
--- a/src/kvilib/ext/kvi_xlib.h
+++ b/src/kvilib/ext/kvi_xlib.h
@@ -26,25 +26,27 @@
#include "kvi_settings.h"
-#ifndef COMPILE_NO_X
+#ifndef COMPILE_ON_WINDOWS
+ #ifndef COMPILE_NO_X
- #ifdef Bool
- // Someone has defined Bool ?
- #undef Bool
- #endif
-
- #include <X11/Xlib.h>
+ #ifdef Bool
+ // Someone has defined Bool ?
+ #undef Bool
+ #endif
+
+ #include <X11/Xlib.h>
- // Too bad that X11/Xlib.h defines Bool, Error and Success... this basically
- // SUX since we can't use them anywhere in the source!
- // this breaks, enums in Qt, enums in KVIrc and other stuff all around...
- // Shame on you Xlib.h author :D
+ // Too bad that X11/Xlib.h defines Bool, Error and Success... this basically
+ // SUX since we can't use them anywhere in the source!
+ // this breaks, enums in Qt, enums in KVIrc and other stuff all around...
+ // Shame on you Xlib.h author :D
- #ifdef Bool
- // NO!
- #undef Bool
- #endif
+ #ifdef Bool
+ // NO!
+ #undef Bool
+ #endif
-#endif // !COMPILE_NO_X
+ #endif // !COMPILE_NO_X
+#endif
#endif //_KVI_XLIB_H_
diff --git a/src/kvilib/net/kvi_netutils.cpp b/src/kvilib/net/kvi_netutils.cpp
index ee0263885..e2836b474 100644
--- a/src/kvilib/net/kvi_netutils.cpp
+++ b/src/kvilib/net/kvi_netutils.cpp
@@ -303,7 +303,8 @@ static unsigned int scan_ip6(const char *s,char ip[16])
return len;
}
-#ifndef WIN2K
+#ifndef COMPILE_ON_WINDOWS
+// #include <Ws2tcpip.h> - already has it
int inet_pton(int AF, const char *CP, void *BUF) {
int len;
if (AF==AF_INET) {
diff --git a/src/kvirc/CMakeLists.txt b/src/kvirc/CMakeLists.txt
index 238393d16..4aeb5bcbe 100644
--- a/src/kvirc/CMakeLists.txt
+++ b/src/kvirc/CMakeLists.txt
@@ -441,6 +441,15 @@ ENDIF()
ADD_EXECUTABLE(${KVIRC_BINARYNAME} ${kvirc_SRCS} ${kvirc_MOC_SRCS})
+
+IF(MSVC)
+ LIST(APPEND LIBS shlwapi.lib)
+ENDIF()
+
+IF(MINGW)
+ LIST(APPEND LIBS shlwapi)
+ENDIF()
+
# Link libraries
TARGET_LINK_LIBRARIES(${KVIRC_BINARYNAME} ${KVILIB_BINARYNAME} ${LIBS})
@@ -458,6 +467,7 @@ IF(WIN32)
#we need this defined when mingw will compile moc files
ADD_DEFINITIONS(-D__KVIRC__)
ADD_DEFINITIONS(-DCOMPILE_USE_STANDALONE_MOC_SOURCES)
+ LIST(APPEND LIBS "shlwapi")
ENDIF()
diff --git a/src/kvirc/ui/kvi_cryptcontroller.h b/src/kvirc/ui/kvi_cryptcontroller.h
index 728351267..ef497a095 100644
--- a/src/kvirc/ui/kvi_cryptcontroller.h
+++ b/src/kvirc/ui/kvi_cryptcontroller.h
@@ -26,10 +26,6 @@
#include "kvi_settings.h"
-
-
-// Qt4 moc bails out on this ??????
-
#if defined(COMPILE_CRYPT_SUPPORT) || defined(Q_MOC_RUN)
#include "kvi_styled_controls.h"
#include "kvi_crypt.h"