mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-20 01:17:46 +00:00
build: cmake falco target deps
Co-authored-by: Lorenzo Fontana <lo@linux.com> Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
committed by
Leo Di Donato
parent
11eed50003
commit
76fbecf907
@@ -1,58 +1,55 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2019 The Falco Authors.
|
# Copyright (C) 2019 The Falco Authors.
|
||||||
#
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
|
||||||
#
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# specific language governing permissions and limitations under the License.
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
set(FALCO_ENGINE_SOURCE_FILES
|
set(FALCO_ENGINE_SOURCE_FILES
|
||||||
rules.cpp
|
rules.cpp
|
||||||
falco_common.cpp
|
falco_common.cpp
|
||||||
falco_engine.cpp
|
falco_engine.cpp
|
||||||
falco_utils.cpp
|
falco_utils.cpp
|
||||||
json_evt.cpp
|
json_evt.cpp
|
||||||
ruleset.cpp
|
ruleset.cpp
|
||||||
token_bucket.cpp
|
token_bucket.cpp
|
||||||
formats.cpp)
|
formats.cpp)
|
||||||
|
|
||||||
add_library(falco_engine STATIC ${FALCO_ENGINE_SOURCE_FILES})
|
add_library(falco_engine STATIC ${FALCO_ENGINE_SOURCE_FILES})
|
||||||
add_dependencies(falco_engine njson lyaml lpeg)
|
add_dependencies(falco_engine njson lyaml lpeg)
|
||||||
|
|
||||||
target_include_directories(falco_engine PUBLIC
|
target_include_directories(
|
||||||
"${LUAJIT_INCLUDE}"
|
falco_engine
|
||||||
"${NJSON_INCLUDE}"
|
PUBLIC
|
||||||
"${CURL_INCLUDE_DIR}"
|
"${LUAJIT_INCLUDE}"
|
||||||
"${TBB_INCLUDE_DIR}"
|
"${NJSON_INCLUDE}"
|
||||||
"${SYSDIG_SOURCE_DIR}/userspace/libsinsp/third-party/jsoncpp"
|
"${CURL_INCLUDE_DIR}"
|
||||||
"${SYSDIG_SOURCE_DIR}/userspace/libscap"
|
"${TBB_INCLUDE_DIR}"
|
||||||
"${SYSDIG_SOURCE_DIR}/userspace/libsinsp"
|
"${SYSDIG_SOURCE_DIR}/userspace/libsinsp/third-party/jsoncpp"
|
||||||
"${PROJECT_BINARY_DIR}/userspace/engine"
|
"${SYSDIG_SOURCE_DIR}/userspace/libscap"
|
||||||
)
|
"${SYSDIG_SOURCE_DIR}/userspace/libsinsp"
|
||||||
|
"${PROJECT_BINARY_DIR}/userspace/engine")
|
||||||
|
|
||||||
target_link_libraries(falco_engine
|
target_link_libraries(falco_engine "${FALCO_SINSP_LIBRARY}" "${LPEG_LIB}" "${LYAML_LIB}" "${LIBYAML_LIB}")
|
||||||
"${FALCO_SINSP_LIBRARY}"
|
|
||||||
"${LPEG_LIB}"
|
|
||||||
"${LYAML_LIB}"
|
|
||||||
"${LIBYAML_LIB}")
|
|
||||||
|
|
||||||
configure_file(config_falco_engine.h.in config_falco_engine.h)
|
configure_file(config_falco_engine.h.in config_falco_engine.h)
|
||||||
|
|
||||||
if(DEFINED FALCO_COMPONENT)
|
if(DEFINED FALCO_COMPONENT)
|
||||||
install(DIRECTORY lua
|
install(
|
||||||
DESTINATION "${FALCO_SHARE_DIR}"
|
DIRECTORY lua
|
||||||
COMPONENT "${FALCO_COMPONENT}"
|
DESTINATION "${FALCO_SHARE_DIR}"
|
||||||
FILES_MATCHING PATTERN *.lua)
|
COMPONENT "${FALCO_COMPONENT}"
|
||||||
|
FILES_MATCHING
|
||||||
|
PATTERN *.lua)
|
||||||
else()
|
else()
|
||||||
install(DIRECTORY lua
|
install(
|
||||||
DESTINATION "${FALCO_SHARE_DIR}"
|
DIRECTORY lua
|
||||||
FILES_MATCHING PATTERN *.lua)
|
DESTINATION "${FALCO_SHARE_DIR}"
|
||||||
|
FILES_MATCHING
|
||||||
|
PATTERN *.lua)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -44,6 +44,12 @@ add_executable(
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/output.pb.cc
|
${CMAKE_CURRENT_BINARY_DIR}/output.pb.cc
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/schema.pb.cc)
|
${CMAKE_CURRENT_BINARY_DIR}/schema.pb.cc)
|
||||||
|
|
||||||
|
add_dependencies(falco civetweb)
|
||||||
|
|
||||||
|
if(USE_BUNDLED_DEPS)
|
||||||
|
add_dependencies(falco yamlcpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
falco
|
falco
|
||||||
PUBLIC
|
PUBLIC
|
||||||
@@ -58,9 +64,10 @@ target_include_directories(
|
|||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
"${DRAIOS_DEPENDENCIES_DIR}/yaml-${DRAIOS_YAML_VERSION}/target/include")
|
"${DRAIOS_DEPENDENCIES_DIR}/yaml-${DRAIOS_YAML_VERSION}/target/include")
|
||||||
|
|
||||||
target_link_libraries(falco falco_engine sinsp)
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
falco
|
falco
|
||||||
|
falco_engine
|
||||||
|
sinsp
|
||||||
"${GRPCPP_LIB}"
|
"${GRPCPP_LIB}"
|
||||||
"${GRPC_LIB}"
|
"${GRPC_LIB}"
|
||||||
"${PROTOBUF_LIB}"
|
"${PROTOBUF_LIB}"
|
||||||
|
Reference in New Issue
Block a user