mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-05 19:06:44 +00:00
build: fix zlib message for dynamically built gRPC
Co-authored-by: Lorenzo Fontana <lo@linux.com> Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
parent
b226f5c7fa
commit
e78506b80f
@ -11,20 +11,14 @@
|
|||||||
# specific language governing permissions and limitations under the License.
|
# specific language governing permissions and limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
option(USE_BUNDLED_DEPS
|
|
||||||
"Build a static version of gRPC (useful for building in Operating Systems that don't have the gRPC package)" OFF)
|
|
||||||
|
|
||||||
if(NOT USE_BUNDLED_DEPS)
|
if(NOT USE_BUNDLED_DEPS)
|
||||||
|
|
||||||
# zlib
|
# zlib
|
||||||
include(FindZLIB)
|
include(FindZLIB)
|
||||||
set(ZLIB_INCLUDE "${ZLIB_INCLUDE_DIRS}")
|
set(ZLIB_INCLUDE "${ZLIB_INCLUDE_DIRS}")
|
||||||
set(ZLIB_LIB "${ZLIB_LIBRARIES}")
|
set(ZLIB_LIB "${ZLIB_LIBRARIES}")
|
||||||
|
|
||||||
if(ZLIB_INCLUDE AND ZLIB_LIB)
|
if(ZLIB_INCLUDE AND ZLIB_LIB)
|
||||||
message(STATUS "Found zlib: ${PROTOC}, include: ${PROTOBUF_INCLUDE}, lib: ${PROTOBUF_LIB}")
|
message(STATUS "Found zlib: include: ${ZLIB_INCLUDE}, lib: ${ZLIB_LIB}")
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Couldn't find system protobuf")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# protobuf
|
# protobuf
|
||||||
@ -93,11 +87,7 @@ else()
|
|||||||
|
|
||||||
get_filename_component(PROTOC_DIR ${PROTOC} PATH)
|
get_filename_component(PROTOC_DIR ${PROTOC} PATH)
|
||||||
|
|
||||||
include(ProcessorCount)
|
set(GRPC_BUILD_FLAGS ${PROCESSOUR_COUNT_MAKE_FLAG})
|
||||||
ProcessorCount(N)
|
|
||||||
if(NOT N EQUAL 0)
|
|
||||||
set(GRPC_BUILD_FLAGS -j${N})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# "cd ${ZLIB_INCLUDE} && ./configure && make"
|
# "cd ${ZLIB_INCLUDE} && ./configure && make"
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
@ -115,7 +105,8 @@ else()
|
|||||||
HAS_SYSTEM_PROTOBUF=false
|
HAS_SYSTEM_PROTOBUF=false
|
||||||
LDFLAGS=-static
|
LDFLAGS=-static
|
||||||
PATH=${PROTOC_DIR}:$ENV{PATH}
|
PATH=${PROTOC_DIR}:$ENV{PATH}
|
||||||
make ${GRPC_BUILD_FLAGS}
|
make
|
||||||
|
${GRPC_BUILD_FLAGS}
|
||||||
grpc_cpp_plugin
|
grpc_cpp_plugin
|
||||||
static_cxx
|
static_cxx
|
||||||
static_c)
|
static_c)
|
||||||
|
Loading…
Reference in New Issue
Block a user