X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2FCMakeLists.txt;h=40675d83acd481a1a0aa39b029421aecea7fb34b;hb=ff5b09c97b4d2a1e163e48bdfcc4ceb5cba98b75;hp=1d4600f6f1f8d52f99614ab6a11bcce75f88afa9;hpb=f06f25532ca06b7edb948131f45f8efea2268589;p=simgear.git diff --git a/simgear/io/CMakeLists.txt b/simgear/io/CMakeLists.txt index 1d4600f6..40675d83 100644 --- a/simgear/io/CMakeLists.txt +++ b/simgear/io/CMakeLists.txt @@ -2,7 +2,7 @@ include (SimGearComponent) -set(HEADERS +set(HEADERS iochannel.hxx lowlevel.hxx raw_socket.hxx @@ -15,10 +15,18 @@ 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 +set(SOURCES iochannel.cxx lowlevel.cxx raw_socket.cxx @@ -31,14 +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 sgdebug) +target_link_libraries(test_sock ${TEST_LIBS}) add_executable(test_http test_HTTP.cxx) -target_link_libraries(test_http sgio sgstructure sgtiming sgmisc sgdebug) +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 ${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)