Skip to content
Snippets Groups Projects
Select Git revision
  • d18f99df5be3e43aa2792f76cdf829e9ec6f6a65
  • main default protected
2 results

CMakeLists.txt

Blame
  • CMakeLists.txt 1.51 KiB
    # Copyright 2020 Free Software Foundation, Inc.
    #
    # This file is part of GNU Radio
    #
    # SPDX-License-Identifier: GPL-3.0-or-later
    #
    
    ########################################################################
    # Check if there is C++ code at all
    ########################################################################
    if(NOT elen90089_sources)
        MESSAGE(STATUS "No C++ sources... skipping python bindings")
        return()
    endif(NOT elen90089_sources)
    
    ########################################################################
    # Check for pygccxml
    ########################################################################
    GR_PYTHON_CHECK_MODULE_RAW(
        "pygccxml"
        "import pygccxml"
        PYGCCXML_FOUND
        )
    
    include(GrPybind)
    
    ########################################################################
    # Python Bindings
    ########################################################################
    
    list(APPEND elen90089_python_files
        corr_est_cc_python.cc
        moe_symbol_sync_cc_python.cc
        symbol_mapper_c_python.cc
        header_format_cdc_python.cc
        constellation_decoder_cf_python.cc
        python_bindings.cc)
    
    GR_PYBIND_MAKE_OOT(elen90089
       ../..
       gr::elen90089
       "${elen90089_python_files}")
    
    # copy in bindings .so file for use in QA test module
    add_custom_target(
      copy_bindings_for_tests ALL
      COMMAND
        ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR}/*.so"
        ${CMAKE_BINARY_DIR}/test_modules/elen90089/
      DEPENDS elen90089_python)
    
    install(TARGETS elen90089_python DESTINATION ${GR_PYTHON_DIR}/elen90089 COMPONENT pythonapi)