summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-10-26 17:58:01 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-10-26 18:01:25 +0200
commitf9c91630f39ce441ed0536064d1678236f67b0d1 (patch)
tree08abd15e5bc65b3de083784e58e033a2b3e42f2a
parent677d6fd86cc17095690acac3d6af4a12f9561c31 (diff)
downloadmanaserv-f9c91630f39ce441ed0536064d1678236f67b0d1.tar.gz
manaserv-f9c91630f39ce441ed0536064d1678236f67b0d1.tar.bz2
manaserv-f9c91630f39ce441ed0536064d1678236f67b0d1.tar.xz
manaserv-f9c91630f39ce441ed0536064d1678236f67b0d1.zip
Always check for zlib and add the necessary library flags
Not only necessary on Windows, but also on Ubuntu (and probably Fedora) This seems to be due to a recent change in how things are packaged. Reviewed-by: Bernd Wachter
-rw-r--r--src/CMakeLists.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d9e3920f..ae565801 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,6 @@
FIND_PACKAGE(LibXml2 REQUIRED)
FIND_PACKAGE(PhysFS REQUIRED)
+FIND_PACKAGE(ZLIB REQUIRED)
IF (CMAKE_COMPILER_IS_GNUCXX)
# Help getting compilation warnings
@@ -80,10 +81,7 @@ IF (CMAKE_BUILD_TYPE)
ENDIF()
IF (WIN32)
- # on the client zlib gets pulled in by LibPNG, for the server
- # we need to add it explicitly
- FIND_PACKAGE(ZLIB REQUIRED)
- SET(EXTRA_LIBRARIES ws2_32 winmm ${ZLIB_LIBRARIES})
+ SET(EXTRA_LIBRARIES ws2_32 winmm)
# GDI APIs Rectangle clashes with tmwserv classes
SET(FLAGS "${FLAGS} -DNOGDI")
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL SunOS)
@@ -309,6 +307,7 @@ FOREACH(program ${PROGRAMS})
TARGET_LINK_LIBRARIES(${program} ${INTERNAL_LIBRARIES}
${PHYSFS_LIBRARY}
${LIBXML2_LIBRARIES}
+ ${ZLIB_LIBRARIES}
${OPTIONAL_LIBRARIES}
${EXTRA_LIBRARIES})
INSTALL(TARGETS ${program} RUNTIME DESTINATION ${PKG_BINDIR})