forked from verifast/vfdeps-win-noz3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcapnpCMakeLists.patch
31 lines (29 loc) · 958 Bytes
/
capnpCMakeLists.patch
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
@@ -46,6 +46,10 @@
# define list of values GUI will offer for the variable
set_property(CACHE WITH_OPENSSL PROPERTY STRINGS AUTO ON OFF)
+set(WITH_ZLIB "AUTO" CACHE STRING
+ "Whether or not to build libkj-gzip by linking against zlib")
+set_property(CACHE WITH_ZLIB PROPERTY STRINGS AUTO ON OFF)
+
# shadow cache variable original value with ON/OFF,
# so from now on OpenSSL-specific code just has to check:
# if (WITH_OPENSSL)
@@ -64,6 +68,19 @@
find_package(OpenSSL REQUIRED COMPONENTS Crypto SSL)
endif()
+if(CAPNP_LITE)
+ set(WITH_ZLIB OFF)
+elseif (WITH_ZLIB STREQUAL "AUTO")
+ find_package(ZLIB)
+ if(ZLIB_FOUND)
+ set(WITH_ZLIB ON)
+ else()
+ set(WITH_ZLIB OFF)
+ endif()
+elseif (WITH_ZLIB)
+ find_package(ZLIB REQUIRED)
+endif()
+
if(MSVC)
# TODO(cleanup): Enable higher warning level in MSVC, but make sure to test
# build with that warning level and clean out false positives.