summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 861d9d18..08110c43 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,10 @@ SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"")
SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"")
SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"")
+IF (WIN32)
+ SET(EXTRA_LIBRARIES ws2_32 winmm)
+ENDIF()
+
SET(GUICHAN_COMPONENTS "SDL")
FIND_PACKAGE(Guichan REQUIRED ${GUICHAN_COMPONENTS})
@@ -548,8 +552,8 @@ SET(SRCS_TMW
SET (PROGRAMS tmw tmw-ea)
-ADD_EXECUTABLE(tmw ${SRCS} ${SRCS_TMW})
-ADD_EXECUTABLE(tmw-ea ${SRCS} ${SRCS_EA})
+ADD_EXECUTABLE(tmw WIN32 ${SRCS} ${SRCS_TMW})
+ADD_EXECUTABLE(tmw-ea WIN32 ${SRCS} ${SRCS_EA})
FOREACH(program ${PROGRAMS})
TARGET_LINK_LIBRARIES(${program} ${SDL_LIBRARY}
@@ -563,7 +567,8 @@ FOREACH(program ${PROGRAMS})
${CURL_LIBRARIES}
${LIBXML2_LIBRARIES}
${GUICHAN_LIBRARIES}
- ${OPENGL_LIBRARIES})
+ ${OPENGL_LIBRARIES}
+ ${EXTRA_LIBRARIES})
INSTALL(TARGETS ${program} RUNTIME DESTINATION ${PKG_BINDIR})
ENDFOREACH(program)