######################################################################## # gr-rylr998: GNU Radio Out-of-Tree Module for RYLR998 LoRa Modems ######################################################################## cmake_minimum_required(VERSION 3.10) project(gr-rylr998 VERSION 0.1.0 LANGUAGES CXX) # Set the default build type if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE) endif() # Find GNU Radio find_package(Gnuradio "3.10" REQUIRED COMPONENTS runtime blocks) # Find Python find_package(Python3 COMPONENTS Interpreter Development REQUIRED) # Set installation directories include(GNUInstallDirs) set(GR_PYTHON_DIR ${CMAKE_INSTALL_PREFIX}/${Python3_SITEARCH}/rylr998) set(GR_GRC_BLOCKS_DIR ${CMAKE_INSTALL_PREFIX}/share/gnuradio/grc/blocks) ######################################################################## # Install Python module ######################################################################## # Python source files set(PYTHON_SOURCES python/rylr998/__init__.py python/rylr998/networkid.py python/rylr998/css_demod.py python/rylr998/css_mod.py python/rylr998/phy_decode.py python/rylr998/phy_encode.py python/rylr998/frame_sync.py python/rylr998/frame_gen.py ) # Install Python module install(FILES ${PYTHON_SOURCES} DESTINATION ${GR_PYTHON_DIR} COMPONENT python ) ######################################################################## # Install GRC block definitions ######################################################################## set(GRC_BLOCKS grc/rylr998_css_demod.block.yml grc/rylr998_css_mod.block.yml grc/rylr998_frame_sync.block.yml grc/rylr998_frame_gen.block.yml grc/rylr998_phy_decode.block.yml grc/rylr998_phy_encode.block.yml grc/rylr998_rx.block.yml grc/rylr998_tx.block.yml ) install(FILES ${GRC_BLOCKS} DESTINATION ${GR_GRC_BLOCKS_DIR} COMPONENT grc ) ######################################################################## # Print summary ######################################################################## message(STATUS "") message(STATUS "========================================") message(STATUS "gr-rylr998 Configuration Summary") message(STATUS "========================================") message(STATUS "Version: ${PROJECT_VERSION}") message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") message(STATUS "Python site-packages: ${GR_PYTHON_DIR}") message(STATUS "GRC blocks dir: ${GR_GRC_BLOCKS_DIR}") message(STATUS "========================================") message(STATUS "")