@@ -9,32 +9,43 @@ find_package( OpenSSL )
99find_package ( Threads )
1010
1111if (Boost_FOUND)
12- set (Boost_USE_STATIC_LIBSON )
13- set (Boost_USE_MULTITHREADEDON )
12+ set (Boost_USE_STATIC_LIBSON )
13+ set (Boost_USE_MULTITHREADEDON )
1414endif (Boost_FOUND)
1515
1616if (OPENSSL_FOUND)
17- include_directories (${OPENSSL_INCLUDE_DIR} )
17+ include_directories (${OPENSSL_INCLUDE_DIR} )
1818endif (OPENSSL_FOUND)
1919
20- add_executable (http_client http_client.cpp)
21- add_executable (simple_wget simple_wget.cpp)
22- add_executable (hello_world_server http/hello_world_server.cpp)
23- add_executable (fileserver http/fileserver.cpp)
24- add_executable (uri uri.cpp)
25- add_executable (uri_builder uri_builder.cpp)
26- add_dependencies (http_client cppnetlib-uri-parsers)
27- add_dependencies (simple_wget cppnetlib-uri-parsers)
28- add_dependencies (uri cppnetlib-uri-parsers)
29- target_link_libraries (http_client${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri-parsers)
30- target_link_libraries (simple_wget${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri-parsers)
31- target_link_libraries (hello_world_server${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
32- target_link_libraries (fileserver${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-server-parsers)
33- target_link_libraries (uri cppnetlib-uri-parsers)
34- target_link_libraries (uri_builder cppnetlib-uri-parsers)
35- set_target_properties (http_client PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
36- set_target_properties (simple_wget PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
37- set_target_properties (hello_world_server PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
38- set_target_properties (fileserver PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
39- set_target_properties (uri PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
40- set_target_properties (uri_builder PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
20+ if (Boost_FOUND)
21+ add_executable (http_client http_client.cpp)
22+ add_dependencies (http_client cppnetlib-uri-parsers)
23+ target_link_libraries (http_client${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri-parsers)
24+ set_target_properties (http_client PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
25+
26+ add_executable (simple_wget simple_wget.cpp)
27+ add_dependencies (simple_wget cppnetlib-uri-parsers)
28+ target_link_libraries (simple_wget${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri-parsers)
29+ set_target_properties (simple_wget PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
30+
31+ add_executable (hello_world_server http/hello_world_server.cpp)
32+ target_link_libraries (hello_world_server${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
33+ set_target_properties (hello_world_server PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
34+
35+ if (UNIX )
36+ add_executable (fileserver http/fileserver.cpp)
37+ target_link_libraries (fileserver${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-server-parsers)
38+ set_target_properties (fileserver PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
39+ endif (UNIX )
40+
41+ add_executable (uri uri.cpp)
42+ add_dependencies (uri cppnetlib-uri-parsers)
43+ target_link_libraries (uri cppnetlib-uri-parsers)
44+ set_target_properties (uri PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
45+
46+ add_executable (uri_builder uri_builder.cpp)
47+ add_dependencies (uri_builder cppnetlib-uri-parsers)
48+ target_link_libraries (uri_builder cppnetlib-uri-parsers)
49+ set_target_properties (uri_builder PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
50+
51+ endif ()