-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcapnpCMakeLists.patch
38 lines (36 loc) · 1.21 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-0.10.4/c++/CMakeLists.txt 2023-04-13 16:14:33.000000000 +0200
+++ capnproto-0.10.4.patch/c++/CMakeLists.txt 2023-04-20 09:14:31.073828400 +0200
@@ -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,24 @@
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
"Whether or not to build libkj-async with fibers")
# define list of values GUI will offer for the variable