Skip to content

Commit

Permalink
Fix build with new generator
Browse files Browse the repository at this point in the history
Lots of contrib packages did not build.

Fixes google#153
Fixes google#152
DemiMarie committed Apr 12, 2022
1 parent ce5da91 commit 13ee0a4
Showing 8 changed files with 11 additions and 15 deletions.
1 change: 1 addition & 0 deletions contrib/c-blosc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ if(NOT TARGET sapi::sapi)
endif()

set(HIDE_SYMBOLS OFF CACHE BOOL "" FORCE)
set(PREFER_EXTERNAL_ZLIB ON CACHE BOOL "" FORCE) # prevent undefined symbol errors
FetchContent_Declare(
libblosc

2 changes: 1 addition & 1 deletion contrib/jsonnet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ FetchContent_Declare(jsonnet
GIT_REPOSITORY https://github.com/google/jsonnet.git
GIT_TAG v0.18.0 # 2021-12-21
)
option(BUILD_TESTS "" OFF) # Do not build jsonnet tests
set(BUILD_TESTS OFF CACHE BOOL "" FORCE) # Do not build jsonnet tests
FetchContent_MakeAvailable(jsonnet)
create_directory_symlink("${jsonnet_SOURCE_DIR}"
"${PROJECT_BINARY_DIR}/jsonnet")
3 changes: 1 addition & 2 deletions contrib/libzip/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ if(NOT TARGET sapi::sapi)
endif()

set(BUILD_SHARED_LIBS off)
set(LIBZIP_DO_INSTALL off)
FetchContent_Declare(libzip
GIT_REPOSITORY https://github.com/nih-at/libzip/
GIT_TAG 34b13ca4e887a5aba050015e3a179069643f4e76
@@ -72,8 +73,6 @@ add_sapi_library(

zip_strerror
INPUTS
"${libzip_BINARY_DIR}/zipconf.h"
"${libzip_SOURCE_DIR}/lib/zip.h"
"wrapper/wrapper_zip.h"

LIBRARY wrapper_zip
5 changes: 0 additions & 5 deletions contrib/libzip/sandboxed.h
Original file line number Diff line number Diff line change
@@ -20,11 +20,6 @@

#include <memory>

// Note: This header is required because of the bug in generator. The generator
// for some reason doesn't catch the types defined by zip (for example
// zip_uint32_t).
#include <zipconf.h> // NOLINT(build/include_order)

#include "sapi_zip.sapi.h" // NOLINT(build/include)

class ZipSapiSandbox : public ZipSandbox {
3 changes: 0 additions & 3 deletions contrib/pffft/main_pffft_sandboxed.cc
Original file line number Diff line number Diff line change
@@ -25,9 +25,6 @@
#include "sandboxed_api/util/flag.h"
#include "sandboxed_api/vars.h"

ABSL_DECLARE_FLAG(string, sandbox2_danger_danger_permit_all);
ABSL_DECLARE_FLAG(string, sandbox2_danger_danger_permit_all_and_log);

class PffftSapiSandbox : public PffftSandbox {
public:
std::unique_ptr<sandbox2::Policy> ModifyPolicy(sandbox2::PolicyBuilder*) {
8 changes: 8 additions & 0 deletions contrib/turbojpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -33,6 +33,14 @@ add_sapi_library(turbojpeg_sapi
LIBRARY turbojpeg
LIBRARY_NAME TurboJPEG
NAMESPACE "turbojpeg_sapi"
FUNCTIONS
tjDestroy
tjGetErrorStr2
tjCompress2
tjInitCompress
tjInitDecompress
tjDecompressHeader3
tjDecompress2
)
add_library(sapi_contrib::turbojpeg ALIAS turbojpeg_sapi)
target_include_directories(turbojpeg_sapi INTERFACE
3 changes: 0 additions & 3 deletions contrib/zopfli/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -48,9 +48,6 @@ add_sapi_library(

ZopfliCompressFD
INPUTS
"${zopfli_SOURCE_DIR}/src/zopfli/deflate.h"
"${zopfli_SOURCE_DIR}/src/zopfli/gzip_container.h"
"${zopfli_SOURCE_DIR}/src/zopfli/zlib_container.h"
wrapper/wrapper_zopfli.h

LIBRARY wrapper_zopfli
1 change: 0 additions & 1 deletion contrib/zstd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -78,7 +78,6 @@ add_sapi_library(
ZSTD_decompress_fd
ZSTD_decompressStream_fd
INPUTS
"${libzstd_INCLUDE_DIR}/zstd.h"
wrapper/wrapper_zstd.h

LIBRARY wrapper_zstd

0 comments on commit 13ee0a4

Please sign in to comment.