summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2010-03-14 15:12:05 +0100
committerBardur Arantsson <bardur@scientician.net>2010-03-14 15:12:05 +0100
commit2777c465106866a27df9568d5d1340028aef576f (patch)
treec0319d6228f714284337312ad046a29e899e0207 /CMakeLists.txt
parent8022a4bd9f795695d93f6025870a6176de7cecea (diff)
Build system: Add build support for Windows/MinGW.
Thanks to wino45 for the help.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3e86110..7b8b149b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,13 @@ ADD_DEFINITIONS(-DUSE_EGO_GRAPHICS)
ADD_DEFINITIONS(-DUSE_TRANSPARENCY)
ADD_DEFINITIONS(-DSUPPORT_GAMMA)
ADD_DEFINITIONS(-DUSE_PRECISE_CMOVIE)
+
+# Which socket implementation are we using?
+IF(WIN32)
+ADD_DEFINITIONS(-DUSE_WINSOCK)
+ELSE()
ADD_DEFINITIONS(-DUSE_UNIXSOCK)
+ENDIF()
#
# X11 support (OPTIONAL)
@@ -74,6 +80,16 @@ IF(CURSES_FOUND)
ENDIF()
#
+# Windows support
+#
+if(WIN32)
+ # Add Windows flags/options
+ ADD_DEFINITIONS(-DWINDOWS)
+ SET(EXECUTABLE_OPTIONS WIN32)
+ SET(LIBS ${LIBS} winmm wsock32)
+endif(WIN32)
+
+#
# Set the path for loading the library bits.
#
IF(SYSTEM_INSTALL)