X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2FCMakeLists.txt;h=40675d83acd481a1a0aa39b029421aecea7fb34b;hb=ff5b09c97b4d2a1e163e48bdfcc4ceb5cba98b75;hp=9613e4b98d8e9fa45b078e1123c54f61ba8fc22d;hpb=08003ceba99b6c81441896a5c60c14bd2352bce5;p=simgear.git diff --git a/simgear/io/CMakeLists.txt b/simgear/io/CMakeLists.txt index 9613e4b9..40675d83 100644 --- a/simgear/io/CMakeLists.txt +++ b/simgear/io/CMakeLists.txt @@ -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,26 +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} - ${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)