summaryrefslogtreecommitdiffstats
path: root/depends/quazip
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-08-26 02:53:29 +0200
committerPetr Mrázek <peterix@gmail.com>2013-08-26 02:53:29 +0200
commit00742af3a6f6d25fbd3b3b77744e8f39a8c14c71 (patch)
tree41631a8ec88cbe637f877f74115c961d61ebdea6 /depends/quazip
parentc5725d653bbe693148d1a34ddcd82f03fda5e8ff (diff)
downloadMultiMC-00742af3a6f6d25fbd3b3b77744e8f39a8c14c71.tar
MultiMC-00742af3a6f6d25fbd3b3b77744e8f39a8c14c71.tar.gz
MultiMC-00742af3a6f6d25fbd3b3b77744e8f39a8c14c71.tar.lz
MultiMC-00742af3a6f6d25fbd3b3b77744e8f39a8c14c71.tar.xz
MultiMC-00742af3a6f6d25fbd3b3b77744e8f39a8c14c71.zip
OS compatibility and generic cleanup.
Removed bspatch/patchlib Now builds and runs on Windows
Diffstat (limited to 'depends/quazip')
-rw-r--r--depends/quazip/CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/depends/quazip/CMakeLists.txt b/depends/quazip/CMakeLists.txt
index b5a391e9..a9adcefe 100644
--- a/depends/quazip/CMakeLists.txt
+++ b/depends/quazip/CMakeLists.txt
@@ -1,5 +1,17 @@
project(quazip)
+# Find ZLIB for quazip
+# Use system zlib on unix and Qt ZLIB on Windows
+IF(UNIX)
+ find_package(ZLIB REQUIRED)
+ELSE(UNIX)
+ SET(ZLIB_INCLUDE_DIRS "${QT_ROOT}/src/3rdparty/zlib" CACHE PATH "Path to ZLIB headers of Qt")
+ SET(ZLIB_LIBRARIES "")
+ IF(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h")
+ MESSAGE("Please specify a valid zlib include dir")
+ ENDIF(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h")
+ENDIF(UNIX)
+
# set all include directories for in and out of source builds
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -19,9 +31,10 @@ ADD_DEFINITIONS(-DQUAZIP_STATIC)
#qt5_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS})
#set(SRCS ${SRCS} ${MOC_SRCS})
-set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(quazip STATIC ${SRCS})
+QT5_USE_MODULES(quazip Core)
target_link_libraries(quazip ${ZLIB_LIBRARIES})
#install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip)