set(PACKAGE rda-rdautils)

message(STATUS ${PACKAGE})

set(APP_NAMES rdadiags rcp903_test rcp903_burnin wsr98d_test wsr98d_amuxIO_monitor wsr98d_typetest pstr1163_tool)
set(LIBEXEC_APP_NAMES bite_export)
set(SERVICE_FILE bite_export.service)

if (DEFINED BASE_SOURCE_DIR)
    include_directories(
            ${BASE_SOURCE_DIR}/user_lib
            ${BASE_SOURCE_DIR}/config_lib)
endif (DEFINED BASE_SOURCE_DIR)

include_directories(
        ${CMAKE_CURRENT_SOURCE_DIR}/../include
        ${CMAKE_CURRENT_SOURCE_DIR}/../pcicards_lib
        ${CMAKE_CURRENT_SOURCE_DIR}/../rdasubs_lib
        ${CMAKE_CURRENT_SOURCE_DIR}/../softplane
        ${CMAKE_CURRENT_SOURCE_DIR}/../netcards_lib)

link_libraries(
        rdasubs dsp-iris softplane netcards pcicards antenna-iris config-iris
        himath-iris user-iris exthdr-iris dl rt pthread m z ipps tirpc modbus)

add_executable(rcp903_burnin rcp903_burnin.c)
add_executable(pstr1163_tool pstr1163_tool.c)
add_executable(bite_export bite_export.c)
add_executable(wsr98d_test wsr98d_test.c)
add_executable(wsr98d_amuxIO_monitor wsr98d_amuxIO_monitor.c)
add_executable(wsr98d_typetest wsr98d_typetest.c)
add_executable(rcp903_test rcp903_test.c)
add_executable(rdadiags rdadiags.c)

install(
  TARGETS ${APP_NAMES}
  DESTINATION ${IRIS_BIN}
  COMPONENT base)

install(
  TARGETS ${LIBEXEC_APP_NAMES}
  DESTINATION ${IRIS_LIBEXEC_SERVICES}
  COMPONENT base)

install(
  FILES ${SERVICE_FILE}
  DESTINATION ${IRIS_SYSCONFDIR}
  COMPONENT base)
