Build and link yaml-cpp lib

This commit is contained in:
Henri DF
2016-04-07 16:30:06 -07:00
parent 997fec2d4b
commit af4089dac3
3 changed files with 22 additions and 1 deletions

View File

@@ -84,6 +84,18 @@ ExternalProject_Add(b64
BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 1
INSTALL_COMMAND "") INSTALL_COMMAND "")
set(YAMLCPP_SRC "${PROJECT_BINARY_DIR}/yamlcpp-prefix/src/yamlcpp")
message(STATUS "Using bundled yaml-cpp in '${YAMLCPP_SRC}'")
set(YAMLCPP_LIB "${YAMLCPP_SRC}/libyaml-cpp.a")
# Once the next version of yaml-cpp is released (first version not requiring
# boost), we can switch to that and no longer pull from github.
ExternalProject_Add(yamlcpp
GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
GIT_TAG "7d2873ce9f2202ea21b6a8c5ecbc9fe38032c229"
BUILD_IN_SOURCE 1
INSTALL_COMMAND "")
set(OPENSSL_BUNDLE_DIR "${PROJECT_BINARY_DIR}/openssl-prefix/src/openssl") set(OPENSSL_BUNDLE_DIR "${PROJECT_BINARY_DIR}/openssl-prefix/src/openssl")
set(OPENSSL_INSTALL_DIR "${OPENSSL_BUNDLE_DIR}/target") set(OPENSSL_INSTALL_DIR "${OPENSSL_BUNDLE_DIR}/target")
set(OPENSSL_LIBRARY_SSL "${OPENSSL_INSTALL_DIR}/lib/libssl.a") set(OPENSSL_LIBRARY_SSL "${OPENSSL_INSTALL_DIR}/lib/libssl.a")

6
digwatch.yaml Normal file
View File

@@ -0,0 +1,6 @@
rules_file: /etc/digwatch.conf
priority_level: warning
outputs:
- file
- syslog

View File

@@ -6,11 +6,14 @@ include_directories(${PROJECT_SOURCE_DIR}/../sysdig/userspace/libsinsp)
include_directories("${PROJECT_BINARY_DIR}/userspace/digwatch") include_directories("${PROJECT_BINARY_DIR}/userspace/digwatch")
include_directories("${CURL_INCLUDE_DIR}") include_directories("${CURL_INCLUDE_DIR}")
include_directories("${LPEG_SRC}") include_directories("${LPEG_SRC}")
include_directories(${DRAIOS_DEPENDENCIES_DIR}/yaml-${DRAIOS_YAML_VERSION}/target/include)
add_executable(digwatch formats.cpp fields.cpp rules.cpp syslog.cpp digwatch.cpp) add_executable(digwatch formats.cpp fields.cpp rules.cpp syslog.cpp digwatch.cpp)
target_link_libraries(digwatch sinsp) target_link_libraries(digwatch sinsp)
target_link_libraries(digwatch "${LPEG_SRC}/lpeg.a") target_link_libraries(digwatch
"${LPEG_SRC}/lpeg.a"
"${YAMLCPP_LIB}")
set(DIGWATCH_LUA_MAIN "rule_loader.lua") set(DIGWATCH_LUA_MAIN "rule_loader.lua")