diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake index f788c26..c64f828 100644 --- a/cmake/abseil-cpp.cmake +++ b/cmake/abseil-cpp.cmake @@ -14,7 +14,7 @@ FetchContent_Declare(absl GIT_REPOSITORY https://github.com/abseil/abseil-cpp - GIT_TAG d96e287417766deddbff2d01b96321288c59491e # 2021-04-23 + GIT_TAG e3fdd9b16a2a90c9e01e00de46605ce59bebc661 # 2022-01-26 ) set(ABSL_CXX_STANDARD ${SAPI_CXX_STANDARD} CACHE STRING "" FORCE) set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE) diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake index bcf7d9d..bddfaab 100644 --- a/cmake/zlib.cmake +++ b/cmake/zlib.cmake @@ -18,12 +18,51 @@ FetchContent_Declare(zlib PATCH_COMMAND patch -p1 < "${SAPI_SOURCE_DIR}/sandboxed_api/bazel/external/zlib.patch" ) -FetchContent_MakeAvailable(zlib) +FetchContent_GetProperties(zlib) +if(NOT zlib_POPULATED) + FetchContent_Populate(zlib) +endif() set(ZLIB_FOUND TRUE) set(ZLIB_INCLUDE_DIRS ${zlib_SOURCE_DIR}) -add_library(ZLIB::ZLIB ALIAS zlibstatic) -target_include_directories(zlibstatic PUBLIC - ${ZLIB_INCLUDE_DIRS} +add_library(z STATIC + ${zlib_SOURCE_DIR}/adler32.c + ${zlib_SOURCE_DIR}/compress.c + ${zlib_SOURCE_DIR}/crc32.c + ${zlib_SOURCE_DIR}/crc32.h + ${zlib_SOURCE_DIR}/deflate.c + ${zlib_SOURCE_DIR}/deflate.h + ${zlib_SOURCE_DIR}/gzclose.c + ${zlib_SOURCE_DIR}/gzguts.h + ${zlib_SOURCE_DIR}/gzlib.c + ${zlib_SOURCE_DIR}/gzread.c + ${zlib_SOURCE_DIR}/gzwrite.c + ${zlib_SOURCE_DIR}/infback.c + ${zlib_SOURCE_DIR}/inffast.c + ${zlib_SOURCE_DIR}/inffast.h + ${zlib_SOURCE_DIR}/inffixed.h + ${zlib_SOURCE_DIR}/inflate.c + ${zlib_SOURCE_DIR}/inflate.h + ${zlib_SOURCE_DIR}/inftrees.c + ${zlib_SOURCE_DIR}/inftrees.h + ${zlib_SOURCE_DIR}/trees.c + ${zlib_SOURCE_DIR}/trees.h + ${zlib_SOURCE_DIR}/uncompr.c + ${zlib_SOURCE_DIR}/zconf.h + ${zlib_SOURCE_DIR}/zlib.h + ${zlib_SOURCE_DIR}/zutil.c + ${zlib_SOURCE_DIR}/zutil.h ) +add_library(ZLIB::ZLIB ALIAS z) +target_include_directories(z PUBLIC + ${zlib_SOURCE_DIR} +) +target_compile_options(z PRIVATE + -w + -Dverbose=-1 +) +target_link_libraries(z PRIVATE + sapi::base +) + diff --git a/sandboxed_api/bazel/sapi_deps.bzl b/sandboxed_api/bazel/sapi_deps.bzl index d81bcc1..136807d 100644 --- a/sandboxed_api/bazel/sapi_deps.bzl +++ b/sandboxed_api/bazel/sapi_deps.bzl @@ -36,9 +36,9 @@ def sapi_deps(): maybe( http_archive, name = "com_google_absl", - sha256 = "7192966b3ca413e7f7f141fac24725571d457f608cb3fc1182167006f50f5155", # 2021-04-23 - strip_prefix = "abseil-cpp-d96e287417766deddbff2d01b96321288c59491e", - urls = ["https://github.com/abseil/abseil-cpp/archive/d96e287417766deddbff2d01b96321288c59491e.zip"], + sha256 = "8fbdf05383ea735e9aa32012bc00afc6ab87cc020b6b3d780719fdb94615b6fb", # 2022-01-26 + strip_prefix = "abseil-cpp-e3fdd9b16a2a90c9e01e00de46605ce59bebc661", + urls = ["https://github.com/abseil/abseil-cpp/archive/e3fdd9b16a2a90c9e01e00de46605ce59bebc661.zip"], ) maybe( http_archive,