-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcapnpCMakeLists.patch
38 lines (36 loc) · 1.1 KB
/
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
32
33
34
35
36
37
38
--- capnproto-c++-0.10.4/CMakeLists.txt 2023-04-13 16:14:33
+++ capnproto-c++-0.10.4.patch/CMakeLists.txt 2023-04-19 08:59:44
@@ -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)
@@ -62,6 +66,24 @@
endif()
elseif (WITH_OPENSSL)
find_package(OpenSSL REQUIRED COMPONENTS Crypto SSL)
+endif()
+
+# shadow cache variable original value with ON/OFF,
+# so from now on ZLIB-specific code just has to check:
+# if (WITH_ZLIB)
+# ...
+# 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()
set(WITH_FIBERS "AUTO" CACHE STRING