set(PACKAGE data_converters-ngpipes-hdf5)

message(STATUS ${PACKAGE})

find_package(HDF5)
find_package(spdlog REQUIRED)

set(PIPE_NAMES hdf52iris)
set(SCRIPTS raw2odimhdf5 odimhdf52raw)
set(CONF_FILES hdf52iris.conf)
set(SOURCE_FILES
        simplehdf5.cpp
        hdf5schema.cpp
        hdf5rxtx.cpp
        hdf5rangemask.cpp
        hdf5sweep.cpp
        hdf5io.cpp)

include_directories(
                ${HDF5_INCLUDE_DIR}
                ${CMAKE_SOURCE_DIR}/ngpipes)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

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

add_executable(h5read_test h5read.cpp simplehdf5.cpp)
add_executable(iris2hdf5 iris2hdf5.cpp ${SOURCE_FILES})
add_executable(hdf52iris hdf52iris.cpp ${SOURCE_FILES})

install(TARGETS ${PIPE_NAMES} DESTINATION ${IRIS_PIPES} COMPONENT hdf5)
install(PROGRAMS ${SCRIPTS} DESTINATION ${IRIS_PIPES} COMPONENT hdf5)
install(FILES ${CONF_FILES} DESTINATION ${IRIS_CONFIG_TMPL} COMPONENT hdf5)

