forked from planetbeing/partial-zip
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
33 lines (24 loc) · 729 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
33 lines (24 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
INCLUDE(FindCURL)
INCLUDE(FindZLIB)
cmake_minimum_required(VERSION 2.6)
SET(BUILD_PARTIAL TRUE)
IF(NOT ZLIB_FOUND)
message(STATUS "zlib is required for partial!")
SET(BUILD_PARTIAL FALSE)
ENDIF(NOT ZLIB_FOUND)
IF(NOT CURL_FOUND)
message(STATUS "curl is required for partial!")
SET(BUILD_PARTIAL FALSE)
ENDIF(NOT CURL_FOUND)
IF(BUILD_PARTIAL)
include_directories(${ZLIB_INCLUDE_DIR})
include_directories(${CURL_INCLUDE_DIR})
include_directories(include)
IF(WIN32)
add_definitions(-DCURL_STATICLIB)
ENDIF(WIN32)
add_library(partial partial.c)
target_link_libraries(partial ${CURL_LIBRARIES} ${ZLIB_LIBRARIES})
add_executable(partialzip test.c)
target_link_libraries(partialzip partial)
ENDIF(BUILD_PARTIAL)