# 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-satellites
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

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

add_subdirectory(bindings)

########################################################################
# Install python sources
########################################################################
GR_PYTHON_INSTALL(
    FILES
    __init__.py
    aausat4_remove_fsm.py
    adapters.py
    adsb_kml.py
    ao40_uncoded_crc.py
    append_crc32c.py
    autopolarization.py
    bch15.py
    beesat_classifier.py
    bme_submitter.py
    bme_ws_submitter.py
    cc11xx_packet_crop.py
    check_address.py
    check_ao40_uncoded_crc.py
    check_astrocast_crc.py
    check_cc11xx_crc.py
    check_crc16_ccitt.py
    check_crc16_ccitt_false.py
    check_crc.py
    check_eseo_crc.py
    check_swiatowid_crc.py
    check_tt64_crc.py
    crc32c.py
    crcs.py
    csp_header.py
    ecss_pus.py
    eseo_line_decoder.py
    eseo_packet_crop.py
    feh.py
    fixedlen_tagger.py
    funcube_submit.py
    grpdu.py
    grtypes.py
    hdlc.py
    hdlc_deframer.py
    hdlc_framer.py
    k2sat_deframer.py
    kiss.py
    kiss_to_pdu.py
    ks1q_header_remover.py
    lilacsat1_gps_kml.py
    ngham_check_crc.py
    ngham_packet_crop.py
    ngham_remove_padding.py
    pdu_to_kiss.py
    print_header.py
    print_timestamp.py
    pwsat2_submitter.py
    pwsat2_telemetry_parser.py
    reflect_bytes.py
    snet_classifier.py
    snet_deframer.py
    submit.py
    swap_crc.py
    swap_header.py
    swiatowid_packet_crop.py
    swiatowid_packet_split.py
    sx12xx_check_crc.py
    sx12xx_packet_crop.py
    DESTINATION ${GR_PYTHON_DIR}/satellites
)

add_subdirectory(ccsds)
add_subdirectory(components)
add_subdirectory(core)
add_subdirectory(hier)
add_subdirectory(filereceiver)
add_subdirectory(satyaml)
add_subdirectory(telemetry)
add_subdirectory(usp)
add_subdirectory(utils)

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

set(GR_TEST_TARGET_DEPS gnuradio-satellites)
set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/swig)
GR_ADD_TEST(qa_costas_loop_8apsk_cc ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_costas_loop_8apsk_cc.py)
GR_ADD_TEST(qa_crc ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_crc.py)
GR_ADD_TEST(qa_fixedlen_tagger ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_fixedlen_tagger.py)
GR_ADD_TEST(qa_fixedlen_to_pdu ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_fixedlen_to_pdu.py)
GR_ADD_TEST(qa_hdlc ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_hdlc.py)
GR_ADD_TEST(qa_kiss ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_kiss.py)
GR_ADD_TEST(qa_manchester_sync ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_manchester_sync.py)
GR_ADD_TEST(qa_nrzi ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_nrzi.py)
GR_ADD_TEST(qa_pdu_add_meta ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_pdu_add_meta.py)
GR_ADD_TEST(qa_pdu_head_tail ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_pdu_head_tail.py)
GR_ADD_TEST(qa_pdu_length_filter ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_pdu_length_filter.py)
GR_ADD_TEST(qa_pdu_scrambler ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_pdu_scrambler.py)
GR_ADD_TEST(qa_phase_unwrap ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_phase_unwrap.py)
GR_ADD_TEST(qa_rs ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_rs.py)
GR_ADD_TEST(qa_selector ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_selector.py)
GR_ADD_TEST(qa_viterbi ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_viterbi.py)
