sg_socket.hxx
sg_socket_udp.hxx
HTTPClient.hxx
+ HTTPFileRequest.hxx
+ HTTPMemoryRequest.hxx
HTTPRequest.hxx
+ AbstractRepository.hxx
+ DAVMultiStatus.hxx
+ SVNRepository.hxx
+ SVNDirectory.hxx
+ SVNReportParser.hxx
+ HTTPRepository.hxx
)
set(SOURCES
sg_socket.cxx
sg_socket_udp.cxx
HTTPClient.cxx
+ HTTPFileRequest.cxx
+ HTTPMemoryRequest.cxx
HTTPRequest.cxx
+ AbstractRepository.cxx
+ DAVMultiStatus.cxx
+ SVNRepository.cxx
+ SVNDirectory.cxx
+ SVNReportParser.cxx
+ HTTPRepository.cxx
)
+if (NOT ENABLE_CURL)
+ list(APPEND SOURCES HTTPContentDecode.cxx)
+ list(APPEND HEADERS HTTPContentDecode.hxx)
+endif()
+
+if(ENABLE_DNS)
+ list(APPEND SOURCES DNSClient.cxx)
+ list(APPEND HEADERS DNSClient.hxx)
+endif()
+
simgear_component(io io "${SOURCES}" "${HEADERS}")
+if(ENABLE_TESTS)
+
+add_executable(http_svn http_svn.cxx)
+target_link_libraries(http_svn ${TEST_LIBS})
+
add_executable(test_sock socktest.cxx)
-target_link_libraries(test_sock sgio sgstructure sgthreads sgdebug
- ${CMAKE_THREAD_LIBS_INIT}
- ${RT_LIBRARY})
+target_link_libraries(test_sock ${TEST_LIBS})
add_executable(test_http test_HTTP.cxx)
-target_link_libraries(test_http
- sgio sgstructure sgthreads sgtiming sgmisc sgdebug
- ${CMAKE_THREAD_LIBS_INIT}
- ${RT_LIBRARY})
+target_link_libraries(test_http ${TEST_LIBS})
add_test(http ${EXECUTABLE_OUTPUT_PATH}/test_http)
+if(ENABLE_DNS)
+ add_executable(test_dns test_DNS.cxx)
+ target_link_libraries(test_dns ${TEST_LIBS})
+ add_test(dns ${EXECUTABLE_OUTPUT_PATH}/test_dns)
+endif()
+
add_executable(httpget httpget.cxx)
-target_link_libraries(httpget
- sgio sgstructure sgthreads sgtiming sgmisc sgdebug
- ${CMAKE_THREAD_LIBS_INIT}
- ${RT_LIBRARY})
+target_link_libraries(httpget ${TEST_LIBS})
+
+add_executable(http_repo_sync http_repo_sync.cxx)
+target_link_libraries(http_repo_sync ${TEST_LIBS})
+
+add_executable(decode_binobj decode_binobj.cxx)
+target_link_libraries(decode_binobj ${TEST_LIBS})
+
+add_executable(test_binobj test_binobj.cxx)
+target_link_libraries(test_binobj ${TEST_LIBS})
+
+add_test(binobj ${EXECUTABLE_OUTPUT_PATH}/test_binobj)
+
+add_executable(test_repository test_repository.cxx)
+target_link_libraries(test_repository ${TEST_LIBS})
+add_test(http_repository ${EXECUTABLE_OUTPUT_PATH}/test_repository)
+
+endif(ENABLE_TESTS)