Closes #1501.
Hiredis
URL "https://github.com/redis/hiredis/archive/refs/tags/v${_hiredis_version_string}.tar.gz"
URL_HASH SHA256=25cee4500f359cf5cad3b51ed62059aadfc0939b05150c1f19c7e2829123631c
+ # Intentionally not using hiredis's build system since it doesn't put
+ # headers in a hiredis subdirectory. Reference:
+ # https://discourse.cmake.org/t/prevent-fetchcontent-makeavailable-to-execute-cmakelists-txt/12704/3
+ SOURCE_SUBDIR dummy
)
+ FetchContent_MakeAvailable(Hiredis)
- # Intentionally not using hiredis's build system since it doesn't put headers
- # in a hiredis subdirectory.
- FetchContent_Populate(Hiredis)
set(
_hiredis_sources
"${hiredis_SOURCE_DIR}/alloc.c"
URL "https://github.com/Cyan4973/xxhash/archive/refs/tags/v${_xxhash_version_string}.tar.gz"
URL_HASH SHA256=aae608dfe8213dfd05d909a57718ef82f30722c392344583d3f39050c7f29a80
)
+ FetchContent_MakeAvailable(Xxhash)
- FetchContent_Populate(Xxhash)
set(_xxhash_sources "${xxhash_SOURCE_DIR}/xxhash.c")
if(PLATFORM STREQUAL x86_64 OR PLATFORM STREQUAL AMD64)
list(APPEND _xxhash_sources "${xxhash_SOURCE_DIR}/xxh_x86dispatch.c")
SOURCE_SUBDIR build/cmake
${_zstd_patch}
)
-
- # When it works: Use FetchContent_MakeAvailable(Zstd) instead
- FetchContent_GetProperties(zstd)
- if(NOT zstd_POPULATED)
- FetchContent_Populate(Zstd)
- add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}" EXCLUDE_FROM_ALL)
- endif()
+ FetchContent_MakeAvailable(Zstd)
unset(ZSTD_BUILD_PROGRAMS)
unset(ZSTD_BUILD_SHARED)