2021-02-27 02:25:22 +00:00
|
|
|
# Copyright 2019-2021, Collabora, Ltd.
|
2019-10-09 20:53:21 +00:00
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
2020-05-12 20:06:22 +00:00
|
|
|
# c-imgui doesn't do well with IPO - lots of warnings.
|
|
|
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)
|
|
|
|
|
2019-10-09 20:53:21 +00:00
|
|
|
set(GUI_SOURCE_FILES
|
|
|
|
gui_common.h
|
|
|
|
gui_imgui.h
|
|
|
|
gui_ogl.c
|
|
|
|
gui_prober.c
|
|
|
|
gui_scene.cpp
|
|
|
|
gui_scene_calibrate.c
|
|
|
|
gui_scene_debug.c
|
|
|
|
gui_scene_main_menu.c
|
2021-02-27 02:25:22 +00:00
|
|
|
gui_scene_record.c
|
2020-10-14 19:12:33 +00:00
|
|
|
gui_scene_remote.c
|
2019-10-09 20:53:21 +00:00
|
|
|
gui_scene_video.c
|
2021-02-16 21:19:50 +00:00
|
|
|
gui_scene_tracking_overrides.c
|
2020-09-14 21:24:56 +00:00
|
|
|
gui_stb.c
|
2020-03-31 19:59:02 +00:00
|
|
|
../../../external/imgui/imgui/cimgui.cpp
|
|
|
|
../../../external/imgui/imgui/cimgui.h
|
2020-09-10 14:28:41 +00:00
|
|
|
../../../external/imgui/imgui/cimplot.cpp
|
|
|
|
../../../external/imgui/imgui/cimplot.h
|
2020-03-31 19:59:02 +00:00
|
|
|
../../../external/imgui/imgui/imconfig.h
|
|
|
|
../../../external/imgui/imgui/imgui.cpp
|
|
|
|
../../../external/imgui/imgui/imgui.h
|
|
|
|
../../../external/imgui/imgui/imgui_demo.cpp
|
|
|
|
../../../external/imgui/imgui/imgui_draw.cpp
|
|
|
|
../../../external/imgui/imgui/imgui_impl_opengl3.cpp
|
|
|
|
../../../external/imgui/imgui/imgui_impl_opengl3.h
|
|
|
|
../../../external/imgui/imgui/imgui_internal.h
|
|
|
|
../../../external/imgui/imgui/imgui_widgets.cpp
|
2020-09-10 14:28:41 +00:00
|
|
|
../../../external/imgui/imgui/implot.cpp
|
|
|
|
../../../external/imgui/imgui/implot.h
|
2021-02-19 03:43:16 +00:00
|
|
|
../../../external/imgui/imgui/implot_demo.cpp
|
2020-09-10 14:28:41 +00:00
|
|
|
../../../external/imgui/imgui/implot_internal.h
|
|
|
|
../../../external/imgui/imgui/implot_items.cpp
|
2020-03-31 19:59:02 +00:00
|
|
|
../../../external/imgui/imgui/imstb_rectpack.h
|
|
|
|
../../../external/imgui/imgui/imstb_textedit.h
|
|
|
|
../../../external/imgui/imgui/imstb_truetype.h
|
2020-09-10 14:28:41 +00:00
|
|
|
../../../external/imgui/imgui_monado/imgui_monado.cpp
|
2019-10-09 20:53:21 +00:00
|
|
|
)
|
|
|
|
|
2020-04-11 11:02:29 +00:00
|
|
|
add_library(st_gui STATIC
|
|
|
|
${GUI_SOURCE_FILES}
|
|
|
|
)
|
2019-10-09 20:53:21 +00:00
|
|
|
|
2020-04-11 11:02:29 +00:00
|
|
|
target_link_libraries(st_gui PRIVATE
|
2020-03-31 19:59:02 +00:00
|
|
|
xrt-external-glad
|
2020-09-14 21:24:56 +00:00
|
|
|
xrt-external-stb
|
2020-04-11 11:02:29 +00:00
|
|
|
aux_util
|
2020-07-16 03:10:37 +00:00
|
|
|
aux_os
|
2020-04-11 11:02:29 +00:00
|
|
|
)
|
|
|
|
target_include_directories(st_gui PUBLIC
|
2020-03-03 23:24:39 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/..
|
2020-03-31 19:59:02 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../../external/imgui
|
2020-10-14 19:12:33 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../drivers
|
2019-10-09 20:53:21 +00:00
|
|
|
)
|
2020-11-18 23:45:07 +00:00
|
|
|
target_compile_definitions(st_gui PUBLIC
|
|
|
|
CIMGUI_NO_EXPORT
|
|
|
|
)
|
2020-03-03 23:24:39 +00:00
|
|
|
|
2021-02-27 02:25:22 +00:00
|
|
|
if(XRT_HAVE_GST)
|
|
|
|
target_link_libraries(st_gui PRIVATE
|
|
|
|
aux_gstreamer
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-06-10 19:31:42 +00:00
|
|
|
if(XRT_BUILD_DRIVER_DEPTHAI)
|
|
|
|
target_link_libraries(st_gui PRIVATE
|
|
|
|
drv_depthai
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-10-14 19:12:33 +00:00
|
|
|
if(XRT_BUILD_DRIVER_REMOTE)
|
|
|
|
target_link_libraries(st_gui PRIVATE
|
|
|
|
drv_remote
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_HAVE_SDL2)
|
2020-03-31 19:59:02 +00:00
|
|
|
add_library(imgui_impl_sdl STATIC
|
|
|
|
../../../external/imgui/imgui/cimgui_sdl.cpp
|
|
|
|
../../../external/imgui/imgui/imgui_impl_sdl.cpp
|
|
|
|
../../../external/imgui/imgui/imgui_impl_sdl.h
|
2020-03-03 23:24:39 +00:00
|
|
|
)
|
2020-04-11 11:02:29 +00:00
|
|
|
target_link_libraries(imgui_impl_sdl PRIVATE
|
|
|
|
${SDL2_LIBRARIES}
|
|
|
|
)
|
2020-03-31 19:59:02 +00:00
|
|
|
target_include_directories(imgui_impl_sdl
|
|
|
|
PRIVATE
|
2020-04-11 11:02:29 +00:00
|
|
|
${SDL2_INCLUDE_DIRS}
|
2020-03-31 19:59:02 +00:00
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../../external/imgui
|
2020-04-11 11:02:29 +00:00
|
|
|
)
|
2020-03-03 23:24:39 +00:00
|
|
|
endif()
|