summaryrefslogtreecommitdiffstats
path: root/depends/quazip/CMakeLists.txt
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-04-21 23:33:00 +0200
committerPetr Mrázek <peterix@gmail.com>2014-04-21 23:33:00 +0200
commit9d724e0fe4bfb7b7940f3f0c9719affd22a18722 (patch)
treec73e9566e134d2b78e6f1b8bce3c32159b17675f /depends/quazip/CMakeLists.txt
parenta9dfe6d7ec949954b07facff71ee6023e0ced9ee (diff)
parenta00fb1e8da505768b491e5f4d6266784fb1a27c9 (diff)
downloadMultiMC-9d724e0fe4bfb7b7940f3f0c9719affd22a18722.tar
MultiMC-9d724e0fe4bfb7b7940f3f0c9719affd22a18722.tar.gz
MultiMC-9d724e0fe4bfb7b7940f3f0c9719affd22a18722.tar.lz
MultiMC-9d724e0fe4bfb7b7940f3f0c9719affd22a18722.tar.xz
MultiMC-9d724e0fe4bfb7b7940f3f0c9719affd22a18722.zip
Merge remote-tracking branch 'origin/feature_cmake_style' into develop
Conflicts: CMakeLists.txt
Diffstat (limited to 'depends/quazip/CMakeLists.txt')
-rw-r--r--depends/quazip/CMakeLists.txt33
1 files changed, 11 insertions, 22 deletions
diff --git a/depends/quazip/CMakeLists.txt b/depends/quazip/CMakeLists.txt
index 76da0a59..b5787307 100644
--- a/depends/quazip/CMakeLists.txt
+++ b/depends/quazip/CMakeLists.txt
@@ -2,16 +2,16 @@ project(quazip)
# Find ZLIB for quazip
# Use system zlib on unix and Qt ZLIB on Windows
-IF(UNIX)
+if(UNIX)
find_package(ZLIB REQUIRED)
-ELSE(UNIX)
- get_filename_component (ZLIB_FOUND_DIR "${Qt5Core_DIR}/../../../include/QtZlib" ABSOLUTE)
- SET(ZLIB_INCLUDE_DIRS ${ZLIB_FOUND_DIR} 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)
+else(UNIX)
+ get_filename_component(ZLIB_FOUND_DIR "${Qt5Core_DIR}/../../../include/QtZlib" ABSOLUTE)
+ set(ZLIB_INCLUDE_DIRS ${ZLIB_FOUND_DIR} 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(
@@ -20,23 +20,12 @@ include_directories(
${ZLIB_INCLUDE_DIRS}
)
-# include with QT_USE selected library parts
-# INCLUDE(${QT_USE_FILE})
-
file(GLOB SRCS "*.c" "*.cpp")
file(GLOB PUBLIC_HEADERS "*.h")
# Static link!
-ADD_DEFINITIONS(-DQUAZIP_STATIC)
-
-#qt5_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS})
-#set(SRCS ${SRCS} ${MOC_SRCS})
-
-#set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+add_definitions(-DQUAZIP_STATIC)
add_library(quazip STATIC ${SRCS})
-QT5_USE_MODULES(quazip Core)
+qt5_use_modules(quazip Core)
target_link_libraries(quazip ${ZLIB_LIBRARIES})
-
-#install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip)
-#install(TARGETS quazip LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION})