mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-04 06:12:04 +00:00
[client] add ImPlot and rework latency graphs
This commit is contained in:
Submodule repos/cimgui deleted from d6b4ecda71
57
repos/gui/CMakeLists.txt
Normal file
57
repos/gui/CMakeLists.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(lg_gui LANGUAGES CXX)
|
||||
|
||||
add_library(lg_gui STATIC
|
||||
cimgui/cimgui.cpp
|
||||
cimgui/imgui/imgui.cpp
|
||||
cimgui/imgui/imgui_draw.cpp
|
||||
cimgui/imgui/imgui_tables.cpp
|
||||
cimgui/imgui/imgui_widgets.cpp
|
||||
cimplot/cimplot.cpp
|
||||
cimplot/implot/implot.cpp
|
||||
cimplot/implot/implot_items.cpp
|
||||
)
|
||||
|
||||
target_compile_definitions(lg_gui PUBLIC
|
||||
IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1
|
||||
IMGUI_USE_WCHAR32
|
||||
IMGUI_USER_CONFIG="../cimconfig.h"
|
||||
)
|
||||
|
||||
if(ENABLE_OPENGL)
|
||||
target_sources(lg_gui PRIVATE
|
||||
cimgui/imgui/backends/imgui_impl_opengl2.cpp
|
||||
)
|
||||
target_compile_definitions(lg_gui PUBLIC CIMGUI_USE_OPENGL2=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_EGL)
|
||||
set(IMGUI_OPENGL3_BACKEND
|
||||
cimgui/imgui/backends/imgui_impl_opengl3.cpp
|
||||
)
|
||||
target_sources(lg_gui PRIVATE ${IMGUI_OPENGL3_BACKEND})
|
||||
set_source_files_properties(${IMGUI_OPENGL3_BACKEND} PROPERTIES
|
||||
COMPILE_DEFINITIONS IMGUI_IMPL_OPENGL_ES3
|
||||
)
|
||||
target_compile_definitions(lg_gui PUBLIC CIMGUI_USE_OPENGL3=1)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(lg_gui PUBLIC
|
||||
IMGUI_IMPL_API=extern\t"C"\t__declspec\(dllexport\)
|
||||
)
|
||||
else()
|
||||
target_compile_definitions(lg_gui PUBLIC IMGUI_IMPL_API=extern\t"C"\t)
|
||||
endif()
|
||||
|
||||
target_include_directories(lg_gui PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cimgui"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cimgui/imgui"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cimplot"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cimplot/implot"
|
||||
)
|
||||
|
||||
set_target_properties(lg_gui PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
)
|
||||
1
repos/gui/cimgui
Submodule
1
repos/gui/cimgui
Submodule
Submodule repos/gui/cimgui added at 4e8fcc1367
1
repos/gui/cimplot
Submodule
1
repos/gui/cimplot
Submodule
Submodule repos/gui/cimplot added at 8213880419
Reference in New Issue
Block a user