mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Fix Fedora build, update to latest Abseil
This partially reverts the zlib change in 41e0ca0
. Turns out the
`CMakeLists.txt` that ships with zlib leaves much to be desired.
PiperOrigin-RevId: 424800727
Change-Id: I356e3bb8d18461a52f845baa4913adff6549ef00
This commit is contained in:
parent
5c7226ced2
commit
8e5771b007
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user