find_package(HDF5)

include_directories(${HDF5_INCLUDE_DIR}
        ${CMAKE_CURRENT_SOURCE_DIR}/../../wrdata_lib
        ${CMAKE_CURRENT_SOURCE_DIR}/../)

#link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../lib ${IRIS_LIB})

set(CMAKE_INCLUDE_CURRENT_DIR ON)

link_libraries(hdf5)

add_executable(h5read_test h5read.cpp simplehdf5.cpp)
add_executable(h5test simplehdf5.cpp)
target_compile_definitions(h5test PRIVATE UNITTEST_BUILD)

set(HDF5_SUPPORT_SOURCES
        simplehdf5.cpp
        hdf5schema.cpp
        hdf5rxtx.cpp
        hdf5rangemask.cpp
        hdf5sweep.cpp
        hdf5io.cpp)

link_libraries(
        wrdata sws hdf5 rscan dsp misc himath user siglog config
        antenna exthdr dl tirpc
        boost_program_options boost_system boost_filesystem boost_regex
        boost_date_time jasper m)

add_executable(iris2hdf5 iris2hdf5.cpp ${HDF5_SUPPORT_SOURCES})
add_executable(hdf52iris hdf52iris.cpp ${HDF5_SUPPORT_SOURCES})
