Skip to content

Commit 0e7cd26

Browse files
committed
Moved the HTTP examples to contrib/http_examples; moved libs/network/doc to doc.
1 parent 5b571ad commit 0e7cd26

File tree

319 files changed

+2659
-17677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+2659
-17677
lines changed

CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,7 @@ add_subdirectory(message)
112112
add_subdirectory(logging)
113113
add_subdirectory(concurrency)
114114
add_subdirectory(http)
115-
add_subdirectory(mime)
115+
#add_subdirectory(mime)
116+
if(CPP-NETLIB_BUILD_EXAMPLES)
117+
add_subdirectory(contrib/http_examples)
118+
endif()

libs/network/example/CMakeLists.txt renamed to contrib/http_examples/CMakeLists.txt

+40-34
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,42 @@
33
# (See accompanying file LICENSE_1_0.txt or copy at
44
# http://www.boost.org/LICENSE_1_0.txt)
55

6-
include_directories(${CPP-NETLIB_SOURCE_DIR}/include)
7-
include_directories(${CPP-NETLIB_SOURCE_DIR})
6+
include_directories(
7+
${CPP-NETLIB_SOURCE_DIR}/uri/src
8+
${CPP-NETLIB_SOURCE_DIR}/message/src
9+
${CPP-NETLIB_SOURCE_DIR}/logging/src
10+
${CPP-NETLIB_SOURCE_DIR}/http/src
11+
${CPP-NETLIB_SOURCE_DIR})
812
if (OPENSSL_FOUND)
913
include_directories(${OPENSSL_INCLUDE_DIR})
1014
endif (OPENSSL_FOUND)
1115

12-
add_executable(uri_builder uri_builder.cpp)
16+
if( NOT CPP-NETLIB_DISABLE_LOGGING )
17+
set( CPP-NETLIB_LOGGING_LIB cppnetlib-logging )
18+
endif()
19+
1320
add_executable(simple_wget simple_wget.cpp)
1421
add_executable(atom_reader atom/atom.cpp atom/main.cpp)
1522
add_executable(rss_reader rss/rss.cpp rss/main.cpp)
1623
add_executable(twitter_search twitter/search.cpp)
17-
add_executable(hello_world_server http/hello_world_server.cpp)
24+
#add_executable(hello_world_server http/hello_world_server.cpp)
1825
add_executable(hello_world_client http/hello_world_client.cpp)
1926
#if (UNIX)
2027
# add_executable(fileserver http/fileserver.cpp)
2128
#endif (UNIX)
2229
set(BOOST_CLIENT_LIBS
23-
${Boost_DATE_TIME_LIBRARY}
24-
${Boost_SYSTEM_LIBRARY}
25-
${Boost_FILESYSTEM_LIBRARY}
26-
${Boost_PROGRAM_OPTIONS_LIBRARY}
27-
${Boost_REGEX_LIBRARY}
28-
)
30+
${Boost_DATE_TIME_LIBRARY}
31+
${Boost_SYSTEM_LIBRARY}
32+
${Boost_FILESYSTEM_LIBRARY}
33+
${Boost_PROGRAM_OPTIONS_LIBRARY}
34+
${Boost_REGEX_LIBRARY}
35+
)
2936
set(BOOST_SERVER_LIBS
30-
${Boost_DATE_TIME_LIBRARY}
31-
${Boost_SYSTEM_LIBRARY}
32-
${Boost_FILESYSTEM_LIBRARY}
33-
${Boost_PROGRAM_OPTIONS_LIBRARY}
34-
)
35-
36-
target_link_libraries(uri_builder
37-
${BOOST_CLIENT_LIBS}
38-
${CMAKE_THREAD_LIBS_INIT}
39-
cppnetlib-uri)
37+
${Boost_DATE_TIME_LIBRARY}
38+
${Boost_SYSTEM_LIBRARY}
39+
${Boost_FILESYSTEM_LIBRARY}
40+
${Boost_PROGRAM_OPTIONS_LIBRARY}
41+
)
4042

4143
target_link_libraries(simple_wget
4244
${BOOST_CLIENT_LIBS}
@@ -49,7 +51,8 @@ target_link_libraries(simple_wget
4951
cppnetlib-http-message
5052
cppnetlib-constants
5153
cppnetlib-http-client
52-
cppnetlib-http-client-connections)
54+
cppnetlib-http-client-connections
55+
${CPP-NETLIB_LOGGING_LIB})
5356

5457
target_link_libraries(atom_reader
5558
${BOOST_CLIENT_LIBS}
@@ -62,7 +65,8 @@ target_link_libraries(atom_reader
6265
cppnetlib-http-message-wrappers
6366
cppnetlib-constants
6467
cppnetlib-http-client
65-
cppnetlib-http-client-connections)
68+
cppnetlib-http-client-connections
69+
${CPP-NETLIB_LOGGING_LIB})
6670

6771
target_link_libraries(rss_reader
6872
${BOOST_CLIENT_LIBS}
@@ -74,7 +78,8 @@ target_link_libraries(rss_reader
7478
cppnetlib-http-message
7579
cppnetlib-constants
7680
cppnetlib-http-client
77-
cppnetlib-http-client-connections)
81+
cppnetlib-http-client-connections
82+
${CPP-NETLIB_LOGGING_LIB})
7883

7984
target_link_libraries(twitter_search
8085
${BOOST_CLIENT_LIBS}
@@ -87,13 +92,15 @@ target_link_libraries(twitter_search
8792
cppnetlib-http-message
8893
cppnetlib-constants
8994
cppnetlib-http-client
90-
cppnetlib-http-client-connections)
95+
cppnetlib-http-client-connections
96+
${CPP-NETLIB_LOGGING_LIB})
9197

92-
target_link_libraries(hello_world_server
93-
${BOOST_SERVER_LIBS}
94-
${CMAKE_THREAD_LIBS_INIT}
95-
cppnetlib-http-server-parsers
96-
cppnetlib-http-server)
98+
#target_link_libraries(hello_world_server
99+
# ${BOOST_SERVER_LIBS}
100+
# ${CMAKE_THREAD_LIBS_INIT}
101+
# cppnetlib-http-server-parsers
102+
# cppnetlib-http-server
103+
# ${CPP-NETLIB_LOGGING_LIB})
97104

98105
target_link_libraries(hello_world_client
99106
${BOOST_CLIENT_LIBS}
@@ -106,15 +113,15 @@ target_link_libraries(hello_world_client
106113
cppnetlib-http-message
107114
cppnetlib-constants
108115
cppnetlib-http-client
109-
cppnetlib-http-client-connections)
116+
cppnetlib-http-client-connections
117+
${CPP-NETLIB_LOGGING_LIB})
110118

111119
if (OPENSSL_FOUND)
112-
target_link_libraries(uri_builder ${OPENSSL_LIBRARIES})
113120
target_link_libraries(simple_wget ${OPENSSL_LIBRARIES})
114121
target_link_libraries(atom_reader ${OPENSSL_LIBRARIES})
115122
target_link_libraries(rss_reader ${OPENSSL_LIBRARIES})
116123
target_link_libraries(twitter_search ${OPENSSL_LIBRARIES})
117-
target_link_libraries(hello_world_server ${OPENSSL_LIBRARIES})
124+
#target_link_libraries(hello_world_server ${OPENSSL_LIBRARIES})
118125
target_link_libraries(hello_world_client ${OPENSSL_LIBRARIES})
119126
endif (OPENSSL_FOUND)
120127

@@ -126,12 +133,11 @@ endif (OPENSSL_FOUND)
126133
# cppnetlib-server-parsers)
127134
#endif (UNIX)
128135

129-
set_target_properties(uri_builder PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
130136
set_target_properties(simple_wget PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
131137
set_target_properties(atom_reader PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
132138
set_target_properties(rss_reader PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
133139
set_target_properties(twitter_search PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
134-
set_target_properties(hello_world_server PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
140+
#set_target_properties(hello_world_server PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
135141
set_target_properties(hello_world_client PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
136142
#if (UNIX)
137143
# set_target_properties(fileserver PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)