Skip to content

Instantly share code, notes, and snippets.

@haakov
Created March 3, 2018 11:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haakov/7561494f3eaf77d4259d5abea33c0c4e to your computer and use it in GitHub Desktop.
Save haakov/7561494f3eaf77d4259d5abea33c0c4e to your computer and use it in GitHub Desktop.
CMake file to compile GNU Radio display_qt C++ example standalone
find_package(Qt5Widgets REQUIRED)
include_directories(
${GR_QTGUI_INCLUDE_DIRS}
${GR_ANALOG_INCLUDE_DIRS}
${GR_FILTER_INCLUDE_DIRS}
${GR_BLOCKS_INCLUDE_DIRS}
${GR_FFT_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${QT_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
add_definitions(${Qt5Widgets_DEFINITIONS})
set(CMAKE_AUTOMOC ON)
list(APPEND QTGUI_LIBRARIES
gnuradio-qtgui
gnuradio-analog
gnuradio-filter
gnuradio-blocks
gnuradio-fft
gnuradio-runtime
Qt5::Widgets
boost_system
)
add_executable(display_qt display_qt.cc ${qtgui_moc_sources})
target_link_libraries(display_qt ${QTGUI_LIBRARIES})
INSTALL(TARGETS
display_qt
DESTINATION build
)
@2997215859
Copy link

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment