Files
simgear/simgear/io/CMakeLists.txt
T
Florent Rougon 79f869a7f3 Move IOStreams-related files to simgear/io/iostreams; rename zfstream.[ch]xx to gzfstream.[ch]xx
- Rename zfstream.cxx (resp. zfstream.hxx) to gzfstream.cxx (resp.
  gzfstream.hxx)

  This is because these files only deal with the gzip format (RFC 1952),
  while zlib can actually read and write two slightly different formats:
  this one and the "ZLIB Compressed Data Format" (RFC 1950). Since I am
  going to add std::streambuf and std::istream subclasses able to deal
  with both formats (and supporting data sources that are general
  std::istream instances, not just files), this renaming will make
  things a bit clearer, I hope.

- Add new folder simgear/io/iostreams and move the following files to
  this folder:

    simgear/misc/gzcontainerfile.cxx
    simgear/misc/gzcontainerfile.hxx
    simgear/misc/gzfstream.cxx
    simgear/misc/gzfstream.hxx
    simgear/misc/sgstream.cxx
    simgear/misc/sgstream.hxx
    simgear/misc/sgstream_test.cxx

- Adapt other files accordingly (mainly #includes and CMakeLists.txt
  files).
2017-02-12 21:18:52 +01:00

95 lines
2.1 KiB
CMake

add_subdirectory(iostreams)
include (SimGearComponent)
set(HEADERS
iochannel.hxx
lowlevel.hxx
raw_socket.hxx
sg_binobj.hxx
sg_file.hxx
sg_netBuffer.hxx
sg_netChannel.hxx
sg_netChat.hxx
sg_serial.hxx
sg_socket.hxx
sg_socket_udp.hxx
HTTPClient.hxx
HTTPFileRequest.hxx
HTTPMemoryRequest.hxx
HTTPRequest.hxx
HTTPRepository.hxx
untar.hxx
)
set(SOURCES
iochannel.cxx
lowlevel.cxx
raw_socket.cxx
sg_binobj.cxx
sg_file.cxx
sg_netBuffer.cxx
sg_netChannel.cxx
sg_netChat.cxx
sg_serial.cxx
sg_socket.cxx
sg_socket_udp.cxx
HTTPClient.cxx
HTTPFileRequest.cxx
HTTPMemoryRequest.cxx
HTTPRequest.cxx
HTTPRepository.cxx
untar.cxx
)
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(test_sock socktest.cxx)
target_link_libraries(test_sock ${TEST_LIBS})
add_executable(test_http test_HTTP.cxx)
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)
add_executable(test_untar test_untar.cxx)
set_target_properties(test_untar PROPERTIES
COMPILE_DEFINITIONS "SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\"" )
target_link_libraries(test_untar ${TEST_LIBS})
add_test(untar ${EXECUTABLE_OUTPUT_PATH}/test_untar)
endif(ENABLE_TESTS)