diff --git a/CMakeLists.txt b/CMakeLists.txt index e873e8e9..48b396eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,6 +94,9 @@ set(CMD_MAKE make) include(ExternalProject) +# spdlog +include(spdlog) + # jq include(jq) diff --git a/cmake/modules/spdlog.cmake b/cmake/modules/spdlog.cmake new file mode 100644 index 00000000..175bd8d9 --- /dev/null +++ b/cmake/modules/spdlog.cmake @@ -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 "" +) \ No newline at end of file diff --git a/userspace/falco/CMakeLists.txt b/userspace/falco/CMakeLists.txt index fa6a4825..473fa1d0 100644 --- a/userspace/falco/CMakeLists.txt +++ b/userspace/falco/CMakeLists.txt @@ -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