summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPetr Mrázek2012-03-10 15:31:46 +0100
committerPetr Mrázek2012-03-10 15:31:46 +0100
commit50b7db982fa88e0b212cc46486b453ed1264c7e9 (patch)
tree15181f94ab1d52e5af9ad3e2c6866a0774d7a1b8 /CMakeLists.txt
parentc260aca3f1097c3d22c214c2c0c137efc84a7cf5 (diff)
downloaddfhack-50b7db982fa88e0b212cc46486b453ed1264c7e9.tar.gz
dfhack-50b7db982fa88e0b212cc46486b453ed1264c7e9.tar.bz2
dfhack-50b7db982fa88e0b212cc46486b453ed1264c7e9.tar.xz
Fix zlib, protobuf.
Zlib is now found using CMake on linux and set to harcoded paths on windows, yet uniform in use throughout the build system. protobuf-lite now compiles under MSVC properly.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f37f7569..22961715 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,15 @@ IF(UNIX)
SET(CMAKE_C_FLAGS "-fvisibility=hidden -m32 -march=i686 -mtune=generic")
ENDIF()
+# find and make available libz
+if(NOT UNIX)
+ SET(ZLIB_INCLUDE_DIRS ${dfhack_SOURCE_DIR}/library/depends/zlib/include/)
+ SET(ZLIB_LIBRARIES ${dfhack_SOURCE_DIR}/library/depends/zlib/lib/zlib.lib)
+else()
+ find_package(ZLIB REQUIRED)
+endif()
+include_directories(${ZLIB_INCLUDE_DIRS})
+
#add depends to include path
INCLUDE_DIRECTORIES ( library/depends )
INCLUDE_DIRECTORIES ( library/depends/protobuf/ )