build: add cmake module for spdlog

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
Leonardo Grasso
2020-11-24 10:30:22 +01:00
parent 3b78cda716
commit 0f0808dd8d
3 changed files with 30 additions and 0 deletions

View File

@@ -94,6 +94,9 @@ set(CMD_MAKE make)
include(ExternalProject)
# spdlog
include(spdlog)
# jq
include(jq)

View File

@@ -0,0 +1,25 @@
#
# Copyright (C) 2020 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
#
# 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
# specific language governing permissions and limitations under the License.
#
set(SPDLOG_PREFIX "${PROJECT_BINARY_DIR}/spdlog-prefix")
set(SPDLOG_INCLUDE_DIR "${SPDLOG_PREFIX}/src/spdlog/include")
message(STATUS "Using bundled spdlog in '${SPDLOG_INCLUDE_DIR}'")
ExternalProject_Add(
spdlog
URL "https://github.com/gabime/spdlog/archive/v1.8.1.tar.gz"
URL_HASH "SHA256=5197b3147cfcfaa67dd564db7b878e4a4b3d9f3443801722b3915cdeced656cb"
BUILD_COMMAND ""
INSTALL_COMMAND ""
)

View File

@@ -33,6 +33,7 @@ set(
"${PROJECT_SOURCE_DIR}/userspace/engine"
"${PROJECT_BINARY_DIR}/userspace/falco"
"${PROJECT_BINARY_DIR}/driver/src"
"${SPDLOG_INCLUDE_DIR}"
"${STRING_VIEW_LITE_INCLUDE}"
"${YAMLCPP_INCLUDE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}"
@@ -41,6 +42,7 @@ set(
set(
FALCO_DEPENDENCIES
spdlog
string-view-lite
libyaml
b64