#
# Third party
#
+
set(ZSTD_FROM_INTERNET AUTO CACHE STRING "Download and use libzstd from the Internet")
set_property(CACHE ZSTD_FROM_INTERNET PROPERTY STRINGS AUTO ON OFF)
set(HIREDIS_FROM_INTERNET AUTO CACHE STRING "Download and use libhiredis from the Internet")
set_property(CACHE HIREDIS_FROM_INTERNET PROPERTY STRINGS AUTO ON OFF)
+option(
+ OFFLINE "Do not download anything from the internet"
+ "$(FETCHCONTENT_FULLY_DISCONNECTED}"
+)
+if(OFFLINE)
+ set(FETCHCONTENT_FULLY_DISCONNECTED ON)
+ set(ZSTD_FROM_INTERNET OFF)
+ set(HIREDIS_FROM_INTERNET OFF)
+endif()
+
find_package(zstd 1.1.2 MODULE REQUIRED)
option(REDIS_STORAGE_BACKEND "Enable Redis remote storage" ON)
- [libzstd](http://www.zstd.net). If you don't have libzstd installed and can't
or don't want to install it in a standard system location, it will be
automatically downloaded, built and linked statically as part of the build
- process. To disable this, pass `-DZSTD_FROM_INTERNET=OFF` to `cmake`, or pass
- `-DZSTD_FROM_INTERNET=ON` to force downloading. You can also install zstd in a
- custom path and pass `-DCMAKE_PREFIX_PATH=/some/custom/path` to `cmake`.
+ process. To disable this, pass `-DOFFLINE=TRUE` or `-DZSTD_FROM_INTERNET=OFF`
+ to `cmake`, or pass `-DZSTD_FROM_INTERNET=ON` to force downloading. You can
+ also install zstd in a custom path and pass
+ `-DCMAKE_PREFIX_PATH=/some/custom/path` to `cmake`.
To link libzstd statically (and you have a static libzstd available), pass
`-DSTATIC_LINK=ON` to `cmake`. This is the default on Windows. Alternatively,
Optional:
- [hiredis](https://github.com/redis/hiredis) for the Redis storage backend. If
- you don't have libhiredis installed and can't or don't want to install it in a
- standard system location, it will be automatically downloaded, built and
+ you don't have libhiredis installed and can't or don't want to install it in
+ a standard system location, it will be automatically downloaded, built and
linked statically as part of the build process. To disable this, pass
- `-DHIREDIS_FROM_INTERNET=OFF` to `cmake`, or pass `-DHIREDIS_FROM_INTERNET=ON`
- to force downloading.. You can also install hiredis in a custom path and pass
- `-DCMAKE_PREFIX_PATH=/some/custom/path` to `cmake`.
+ `-DOFFLINE=TRUE` or `-DHIREDIS_FROM_INTERNET=OFF` to `cmake`, or pass
+ `-DHIREDIS_FROM_INTERNET=ON` to force downloading. You can also install
+ hiredis in a custom path and pass `-DCMAKE_PREFIX_PATH=/some/custom/path` to
+ `cmake`.
To link libhiredis statically (and you have a static libhiredis available),
pass `-DSTATIC_LINK=ON` to `cmake`. This is the default on Windows.