mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
A new phy scope based on ImGui and ImPlot. This scope uses a different concurrency model than previous scopes. The PHY thread writing the data first checks if the data is ready to be written. If its not, nothing is copied. The GUI thread reads data if available and marks it ready to write. This makes sure that the PHY threads are not busy copying data that would never be displayed. Some of the scopes also have a freeze functionality that further limit the amount of data that needs to be copied from PHY threads. If a scope is "frozen" it still allows the user to explore the data using plots zoom/pan functions but doesn't cause PHY threads to perform extra writes on the displayed data. A compile option was added to enable/disable the scope. Use cmake -DENABLE_IMSCOPE=ON to enable the scope. Update CXX standard to 17; it is required by some libraries (e.g., dear imgui). The oldest gcc version in use by a distribution supported is Ubuntu 20, which has gcc 9.4 with c++17 support.
35 lines
1.3 KiB
CMake
35 lines
1.3 KiB
CMake
|
|
CPMAddPackage("gh:ocornut/imgui#v1.90.9")
|
|
add_library(imgui
|
|
${imgui_SOURCE_DIR}/imgui_draw.cpp
|
|
${imgui_SOURCE_DIR}/imgui.cpp
|
|
${imgui_SOURCE_DIR}/imgui_widgets.cpp
|
|
${imgui_SOURCE_DIR}/imgui_tables.cpp
|
|
${imgui_SOURCE_DIR}/imgui_demo.cpp
|
|
)
|
|
target_include_directories(imgui PUBLIC ${imgui_SOURCE_DIR})
|
|
|
|
add_library(imgui_opengl_renderer ${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp)
|
|
target_include_directories(imgui_opengl_renderer PUBLIC ${imgui_SOURCE_DIR}/backends/)
|
|
target_link_libraries(imgui_opengl_renderer PUBLIC imgui)
|
|
|
|
add_library(imgui_glfw_backend ${imgui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp)
|
|
target_include_directories(imgui_glfw_backend PUBLIC ${imgui_SOURCE_DIR}/backends/)
|
|
target_link_libraries(imgui_glfw_backend PUBLIC imgui)
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
find_package(glfw3 3.3 REQUIRED)
|
|
|
|
CPMAddPackage("gh:epezent/implot#v0.16")
|
|
add_library(implot
|
|
${implot_SOURCE_DIR}/implot.cpp
|
|
${implot_SOURCE_DIR}/implot_demo.cpp
|
|
${implot_SOURCE_DIR}/implot_items.cpp
|
|
)
|
|
target_link_libraries(implot PUBLIC imgui)
|
|
target_include_directories(implot PUBLIC ${implot_SOURCE_DIR})
|
|
|
|
add_library(imscope MODULE imscope.cpp ../phy_scope_interface.c)
|
|
target_link_libraries(imscope PUBLIC imgui_glfw_backend glfw imgui_opengl_renderer OpenGL::OpenGL implot UTIL)
|
|
set_target_properties(imscope PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|