From 4c371e5b1d7686c63f4b36eaa1f1f480b3da898d Mon Sep 17 00:00:00 2001 From: Henri DF Date: Wed, 17 Feb 2016 20:17:26 -0800 Subject: [PATCH] Add curl dependency --- CMakeLists.txt | 20 +++++++++++++++++++- userspace/digwatch/CMakeLists.txt | 5 +++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c7cd3915..a4366af0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,25 @@ endif() set(PACKAGE_NAME "draios-digwatch") -add_subdirectory(${PROJECT_SOURCE_DIR}/../sysdig ${PROJECT_BINARY_DIR}/sysdig) +add_definitions(-DK8S_DISABLE_THREAD) + +set(SYSDIG_DIR ${PROJECT_SOURCE_DIR}/../sysdig) + +add_subdirectory(${SYSDIG_DIR} ${PROJECT_BINARY_DIR}/sysdig) + +set(CURL_BUNDLE_DIR "${sysdig_BINARY_DIR}/curl-prefix/src/curl") +set(CURL_INCLUDE_DIR "${CURL_BUNDLE_DIR}/include/") +set(CURL_LIBRARIES "${CURL_BUNDLE_DIR}/lib/.libs/libcurl.a") +if(NOT USE_BUNDLED_OPENSSL) + set(CURL_SSL_OPTION "") +else() + set(CURL_SSL_OPTION "--with-ssl=${OPENSSL_INSTALL_DIR}") +endif() + +message(STATUS "Using bundled curl in '${CURL_BUNDLE_DIR}'") +message(STATUS "Using SSL for curl in '${CURL_SSL_OPTION}'") + + add_subdirectory(userspace/digwatch) diff --git a/userspace/digwatch/CMakeLists.txt b/userspace/digwatch/CMakeLists.txt index a6c8420e..a539a445 100644 --- a/userspace/digwatch/CMakeLists.txt +++ b/userspace/digwatch/CMakeLists.txt @@ -1,5 +1,10 @@ include_directories(${PROJECT_SOURCE_DIR}/../sysdig/userspace/libsinsp/third-party/jsoncpp) +if(NOT APPLE) + include_directories("${CURL_INCLUDE_DIR}") +endif() + + include_directories(${PROJECT_SOURCE_DIR}/../sysdig/userspace/libscap) include_directories(${PROJECT_SOURCE_DIR}/../sysdig/userspace/libsinsp)