Skip to content

Commit

Permalink
[INLONG-10221][SDK] DataProxy SDK of cpp supports automatic installat…
Browse files Browse the repository at this point in the history
…ion of log4cplus components (#10222)
  • Loading branch information
doleyzi committed May 15, 2024
1 parent 540fd51 commit 11e52ba
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ add_library(dataproxy_sdk STATIC ${UTILS} ${CONFIGS} ${CORE} ${MANAGER} ${GROUP}

set_target_properties(dataproxy_sdk PROPERTIES OUTPUT_NAME "dataproxy_sdk" PREFIX "")

target_link_libraries(dataproxy_sdk liblog4cplus.a libsnappy.a libcurl.a)
target_link_libraries(dataproxy_sdk liblog4cplusS.a libsnappy.a libcurl.a)

10 changes: 9 additions & 1 deletion inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@

#!/bin/bash


# Install third-party components
cd ./third_party
cmake .
make

cd ../
rm -r build
mkdir build
# mkdir release

# Compile project code
cd build
cmake ../
make
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error")

include(ExternalProject)

ExternalProject_Add(
log4cplus
GIT_REPOSITORY https://github.com/log4cplus/log4cplus.git
GIT_TAG REL_2_0_8
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PROJECT_SOURCE_DIR} -DBUILD_SHARED_LIBS=OFF
)

ExternalProject_Add(
snappy_proj
URL https://github.com/google/snappy/archive/1.1.8.tar.gz
Expand Down

0 comments on commit 11e52ba

Please sign in to comment.