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})
812if (OPENSSL_FOUND)
913 include_directories (${OPENSSL_INCLUDE_DIR} )
1014endif (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+
1320add_executable (simple_wget simple_wget.cpp)
1421add_executable (atom_reader atom/atom.cpp atom/main.cpp)
1522add_executable (rss_reader rss/rss.cpp rss/main.cpp)
1623add_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)
1825add_executable (hello_world_client http/hello_world_client.cpp)
1926#if (UNIX)
2027# add_executable(fileserver http/fileserver.cpp)
2128#endif (UNIX)
2229set (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+ )
2936set (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
4143target_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
5457target_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
6771target_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
7984target_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
98105target_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
111119if (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} )
119126endif (OPENSSL_FOUND)
120127
@@ -126,12 +133,11 @@ endif (OPENSSL_FOUND)
126133# cppnetlib-server-parsers)
127134#endif (UNIX)
128135
129- set_target_properties (uri_builder PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
130136set_target_properties (simple_wget PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
131137set_target_properties (atom_reader PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
132138set_target_properties (rss_reader PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
133139set_target_properties (twitter_search PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
134- set_target_properties (hello_world_server PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
140+ # set_target_properties(hello_world_server PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)
135141set_target_properties (hello_world_client PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
136142#if (UNIX)
137143# set_target_properties(fileserver PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)