Skip to content

Commit ea70dba

Browse files
committed
Move curi and jsonxx to the third_party directory
1 parent c0274f7 commit ea70dba

File tree

10 files changed

+19
-1706
lines changed

10 files changed

+19
-1706
lines changed

.gitmodules

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
[submodule "src/jsonxx"]
2-
path = src/jsonxx
1+
[submodule "third_party/jsonxx"]
2+
path = third_party/jsonxx
33
url = https://github.com/hjiang/jsonxx.git
44
[submodule "third_party/networking-ts-impl"]
55
path = third_party/networking-ts-impl
66
url = https://github.com/chriskohlhoff/networking-ts-impl.git
7+
[submodule "third_party/curi"]
8+
path = third_party/curi
9+
url = https://github.com/lxrite/curi.git

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
2020
add_compile_options("/std:c++17")
2121
endif()
2222

23-
add_executable(ahpc src/http_proxy_client_main.cpp src/http_proxy_client.cpp src/http_proxy_client_config.cpp src/http_proxy_client_connection.cpp src/jsonxx/jsonxx.cc)
24-
target_link_libraries(ahpc ${OPENSSL_LIBRARIES})
23+
include_directories("third_party/jsonxx")
24+
add_library(jsonxx STATIC third_party/jsonxx/jsonxx.cc)
2525

26-
add_executable(ahps src/http_proxy_server_main.cpp src/http_proxy_server.cpp src/http_proxy_server_config.cpp src/http_proxy_server_connection.cpp src/http_header_parser.cpp src/base64.cpp src/authentication.cpp src/jsonxx/jsonxx.cc src/curi/curi.c)
27-
target_link_libraries(ahps ${OPENSSL_LIBRARIES})
26+
include_directories("third_party/curi/src")
27+
add_subdirectory(third_party/curi/src)
28+
29+
add_executable(ahpc src/http_proxy_client_main.cpp src/http_proxy_client.cpp src/http_proxy_client_config.cpp src/http_proxy_client_connection.cpp)
30+
target_link_libraries(ahpc ${OPENSSL_LIBRARIES} jsonxx)
31+
32+
add_executable(ahps src/http_proxy_server_main.cpp src/http_proxy_server.cpp src/http_proxy_server_config.cpp src/http_proxy_server_connection.cpp src/http_header_parser.cpp src/base64.cpp src/authentication.cpp)
33+
target_link_libraries(ahps ${OPENSSL_LIBRARIES} jsonxx curi)
2834

2935
if(UNIX)
3036
target_link_libraries(ahpc pthread)

0 commit comments

Comments
 (0)