Skip to content

Commit

Permalink
Use tbb, libcurl on osx, disable libidn2
Browse files Browse the repository at this point in the history
We need it now that tbb is a core part of the inspector and that the
curl part of the docker container engine isn't #ifdefd with HAS_CAPTURE.

Both are already downloaded/built as dependencies of sysdig so it's just
a matter of CMakeLists.txt config.

Also, disable libidn2 explicitly when building libcurl. On OSX builds
this gets picked up from an autodetected library, while it does not get
picked up on linux. We already disable libidn1, so also disable libidn2.
  • Loading branch information
mstemm committed Mar 15, 2019
1 parent 86066a2 commit 0eb84d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ endif()
#
# Intel tbb
#
if(NOT WIN32 AND NOT APPLE)
if(NOT WIN32)
option(USE_BUNDLED_TBB "Enable building of the bundled tbb" ${USE_BUNDLED_DEPS})
if(NOT USE_BUNDLED_TBB)
find_path(TBB_INCLUDE_DIR tbb.h PATH_SUFFIXES tbb)
Expand Down Expand Up @@ -411,7 +411,7 @@ if(NOT WIN32)
DEPENDS openssl
URL "http://download.draios.com/dependencies/curl-7.61.0.tar.bz2"
URL_MD5 "31d0a9f48dc796a7db351898a1e5058a"
CONFIGURE_COMMAND ./configure ${CURL_SSL_OPTION} --disable-threaded-resolver --disable-shared --enable-optimize --disable-curldebug --disable-rt --enable-http --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-sspi --disable-ntlm-wb --disable-tls-srp --without-winssl --without-darwinssl --without-polarssl --without-cyassl --without-nss --without-axtls --without-ca-path --without-ca-bundle --without-libmetalink --without-librtmp --without-winidn --without-libidn --without-nghttp2 --without-libssh2
CONFIGURE_COMMAND ./configure ${CURL_SSL_OPTION} --disable-threaded-resolver --disable-shared --enable-optimize --disable-curldebug --disable-rt --enable-http --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-sspi --disable-ntlm-wb --disable-tls-srp --without-winssl --without-darwinssl --without-polarssl --without-cyassl --without-nss --without-axtls --without-ca-path --without-ca-bundle --without-libmetalink --without-librtmp --without-winidn --without-libidn --without-libidn2 --without-nghttp2 --without-libssh2
BUILD_COMMAND ${CMD_MAKE}
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${CURL_LIBRARIES}
Expand Down
13 changes: 9 additions & 4 deletions userspace/libsinsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,22 @@ include_directories(../libscap)
include_directories(../async)
include_directories("${JSONCPP_INCLUDE}")
include_directories("${LUAJIT_INCLUDE}")
include_directories("${TBB_INCLUDE_DIR}")

if(NOT WIN32 AND NOT APPLE)
include_directories("${B64_INCLUDE}")
include_directories("${CURL_INCLUDE_DIR}")
include_directories("${CURSES_INCLUDE_DIR}")
include_directories("${GRPC_INCLUDE}")
include_directories("${JQ_INCLUDE}")
include_directories("${OPENSSL_INCLUDE_DIR}")
include_directories("${PROTOBUF_INCLUDE}")
include_directories("${TBB_INCLUDE_DIR}")
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
endif()

if(NOT WIN32)
include_directories("${CURL_INCLUDE_DIR}")
endif()

set(SINSP_SOURCES
chisel.cpp
chisel_api.cpp
Expand Down Expand Up @@ -150,9 +153,13 @@ if(NOT WIN32)
endif()
if(USE_BUNDLED_CURL)
add_dependencies(sinsp curl)
target_link_libraries(sinsp
"${CURL_LIBRARIES}")
endif()
if(USE_BUNDLED_TBB)
add_dependencies(sinsp tbb)
target_link_libraries(sinsp
"${TBB_LIB}")
endif()

if(NOT APPLE)
Expand All @@ -174,8 +181,6 @@ if(NOT WIN32)
"${CARES_LIB}"
"${JQ_LIB}"
"${B64_LIB}"
"${CURL_LIBRARIES}"
"${TBB_LIB}"
rt
anl)
endif()
Expand Down
4 changes: 1 addition & 3 deletions userspace/sysdig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@
# limitations under the License.
#
include_directories("${JSONCPP_INCLUDE}")
include_directories("${TBB_INCLUDE_DIR}")

if(NOT WIN32)
if(NOT APPLE)
include_directories("${CURL_INCLUDE_DIR}")
include_directories("${TBB_INCLUDE_DIR}")
endif()
include_directories("${CURSES_INCLUDE_DIR}")
endif()

Expand Down

0 comments on commit 0eb84d4

Please sign in to comment.