# Copyright 2011 Free Software Foundation, Inc.
#
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-radio_astro
#
# SPDX-License-Identifier: GPL-3.0-or-later
#

########################################################################
# Include python install macros
########################################################################
include(GrPython)
if(NOT PYTHONINTERP_FOUND)
    return()
endif()

add_subdirectory(bindings)

########################################################################
# Install python sources
########################################################################
GR_PYTHON_INSTALL(
    FILES
    __init__.py
    systemp_calibration.py
    chart_recorder.py
    correlate.py
    csv_filesink.py
    hdf5_sink.py
    radioastronomy.py
    jdutil.py
    angles.py
    ra_ascii_sink.py
    ra_event_log.py
    ra_event_sink.py
    ra_integrate.py
    ra_vave.py
    ra_vmedian.py 
    powerSpectrum.py
    integration.py
    vector_moving_average.py
    png_print_spectrum.py
    DESTINATION ${GR_PYTHON_DIR}/radio_astro
)

########################################################################
# Handle the unit tests
########################################################################
include(GrTest)

set(GR_TEST_TARGET_DEPS gnuradio-radio_astro)

# Create a package directory that tests can import. It includes everything
# from `python/`.
add_custom_target(
  copy_module_for_tests ALL
  COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}
          ${CMAKE_BINARY_DIR}/test_modules/radio_astro/
)
