diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix --- a/nix/dev-shell.nix +++ b/nix/dev-shell.nix @@ -3,14 +3,17 @@ , lib , amqp-cpp , arcanist +, aws-sdk-cpp , boost , cargo , cmake , cryptopp , darwin +, double-conversion , fbjni , folly , fmt +, glog , grpc , libiconv , libuv @@ -58,7 +61,10 @@ # include any libraries buildInputs buildInputs = [ + aws-sdk-cpp # tunnelbroker + double-conversion # tunnelbroker fbjni # android builds + glog # tunnelbroker protobuf_3_15_cmake # exposes both a library and a command, thus should appear in both inputs folly # cpp tools fmt # needed for folly @@ -79,6 +85,10 @@ export MYSQL_UNIX_PORT=''${XDG_RUNTIME_DIR:-/run/user/$UID}/mysql-socket/mysql.sock fi + # TODO: Fix aws sdk cmake installation path logic upstream + export AWSSDK_ROOT_DIR=${lib.getDev aws-sdk-cpp} + export AWSSDK_CORE_HEADER_FILE=${lib.getDev aws-sdk-cpp}/include/aws/core/Aws.h + echo "Welcome to Comm dev environment! :)" ''; } diff --git a/services/tunnelbroker/CMakeLists.txt b/services/tunnelbroker/CMakeLists.txt --- a/services/tunnelbroker/CMakeLists.txt +++ b/services/tunnelbroker/CMakeLists.txt @@ -12,9 +12,9 @@ find_package(PkgConfig REQUIRED) -# FIND LIBS -include(./cmake-components/grpc.cmake) -include(./cmake-components/folly.cmake) +find_package(double-conversion REQUIRED) +find_package(Folly REQUIRED) +find_package(gRPC REQUIRED) # Find AMQP-CPP installation find_package(amqpcpp CONFIG REQUIRED) @@ -32,7 +32,7 @@ find_package(Boost 1.40 COMPONENTS program_options thread system REQUIRED) find_package(OpenSSL REQUIRED) -add_subdirectory(./lib/glog) +find_package(glog) # Generated sources get_filename_component(proto "protos/tunnelbroker.proto" ABSOLUTE) @@ -59,7 +59,6 @@ file(GLOB_RECURSE SOURCE_CODE "./src/*.cpp") set(GENERATED_CODE ${proto_srcs} ${proto_hdrs} ${grpc_srcs} ${grpc_hdrs}) -file(GLOB DOUBLE_CONVERSION_SOURCES "./lib/double-conversion/double-conversion/*.cc") include_directories( ./src @@ -69,8 +68,6 @@ ./src/Tools ./src/Amqp ${GENERATED_BASE_DIR} - ${FOLLY_INCLUDES} - ./lib/double-conversion ${Boost_INCLUDE_DIR} ${CRYPTOPP_INCLUDE_DIRS} ${LIBUV_INCLUDE_DIRS} @@ -87,9 +84,8 @@ set( LIBS - ${GRPC_LIBS} - ${_PROTOBUF_LIBPROTOBUF} - ${_REFLECTION} + gRPC::grpc++_reflection + gRPC::grpc++ ${AWSSDK_LINK_LIBRARIES} ${CRYPTOPP_LIBRARIES} ${LIBUV_LIBRARIES} @@ -97,6 +93,8 @@ amqpcpp OpenSSL::SSL glog::glog + double-conversion::double-conversion + Folly::folly ) #SERVER