]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/CMakeLists.txt
Initial commit for a DNS service resolver
[simgear.git] / simgear / io / CMakeLists.txt
index e85d9659c7e0f0d3865fb5d940b899e823a8e97a..40675d83acd481a1a0aa39b029421aecea7fb34b 100644 (file)
@@ -15,7 +15,15 @@ set(HEADERS
     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
@@ -31,29 +39,64 @@ 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}
-    ${WINSOCK_LIBRARY}
-    ${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}
-    ${WINSOCK_LIBRARY}
-    ${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}
-    ${WINSOCK_LIBRARY}
-    ${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)