2019-03-28 04:03:35 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2021-07-08 01:45:54 +00:00
|
|
|
project(renderer_EGL LANGUAGES C CXX)
|
2019-03-28 00:02:36 +00:00
|
|
|
|
2019-03-28 04:01:52 +00:00
|
|
|
find_package(PkgConfig)
|
2021-07-24 01:47:54 +00:00
|
|
|
pkg_check_modules(RENDERER_EGL REQUIRED IMPORTED_TARGET
|
2019-03-28 00:02:36 +00:00
|
|
|
egl
|
2019-03-28 01:31:28 +00:00
|
|
|
gl
|
2019-03-28 00:02:36 +00:00
|
|
|
)
|
|
|
|
|
2021-07-24 01:47:54 +00:00
|
|
|
pkg_check_modules(RENDERER_EGL_OPT IMPORTED_TARGET
|
2019-10-26 00:23:04 +00:00
|
|
|
wayland-egl
|
|
|
|
)
|
|
|
|
|
2019-03-28 04:01:52 +00:00
|
|
|
include(MakeObject)
|
2019-03-28 03:59:54 +00:00
|
|
|
make_object(
|
|
|
|
EGL_SHADER
|
|
|
|
shader/desktop.vert
|
|
|
|
shader/desktop_rgb.frag
|
2019-03-28 04:53:15 +00:00
|
|
|
shader/cursor.vert
|
|
|
|
shader/cursor_rgb.frag
|
|
|
|
shader/cursor_mono.frag
|
2021-07-15 10:04:25 +00:00
|
|
|
shader/damage.vert
|
|
|
|
shader/damage.frag
|
2019-03-28 04:53:15 +00:00
|
|
|
shader/splash_bg.vert
|
|
|
|
shader/splash_bg.frag
|
|
|
|
shader/splash_logo.vert
|
|
|
|
shader/splash_logo.frag
|
2019-03-28 03:59:54 +00:00
|
|
|
)
|
|
|
|
|
2021-02-21 02:26:23 +00:00
|
|
|
make_defines(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/shader/desktop_rgb.frag"
|
2021-02-22 04:56:51 +00:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/shader/desktop_rgb.def.h"
|
2021-02-21 02:26:23 +00:00
|
|
|
)
|
|
|
|
|
2019-03-28 08:56:14 +00:00
|
|
|
add_library(renderer_EGL STATIC
|
2019-03-28 00:02:36 +00:00
|
|
|
egl.c
|
2021-01-24 02:17:11 +00:00
|
|
|
egldebug.c
|
2019-03-28 00:02:36 +00:00
|
|
|
shader.c
|
|
|
|
texture.c
|
|
|
|
model.c
|
|
|
|
desktop.c
|
|
|
|
cursor.c
|
|
|
|
draw.c
|
|
|
|
splash.c
|
2021-07-15 10:04:25 +00:00
|
|
|
damage.c
|
2019-03-28 03:59:54 +00:00
|
|
|
${EGL_SHADER_OBJS}
|
2021-02-22 04:56:51 +00:00
|
|
|
"${EGL_SHADER_INCS}/desktop_rgb.def.h"
|
2021-07-08 01:45:54 +00:00
|
|
|
${PROJECT_TOP}/repos/cimgui/imgui/backends/imgui_impl_opengl3.cpp
|
2019-03-28 00:02:36 +00:00
|
|
|
)
|
|
|
|
|
2021-07-18 06:38:37 +00:00
|
|
|
target_compile_definitions(renderer_EGL PRIVATE CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1 IMGUI_IMPL_OPENGL_ES3)
|
2021-07-08 01:45:54 +00:00
|
|
|
|
2019-03-28 08:56:14 +00:00
|
|
|
target_link_libraries(renderer_EGL
|
2021-07-24 01:47:54 +00:00
|
|
|
PkgConfig::RENDERER_EGL
|
2019-04-11 01:12:59 +00:00
|
|
|
lg_common
|
2021-07-08 01:45:54 +00:00
|
|
|
|
|
|
|
cimgui
|
2019-03-28 00:02:36 +00:00
|
|
|
)
|
2021-07-24 01:47:54 +00:00
|
|
|
if(RENDERER_EGL_OPT_FOUND)
|
|
|
|
target_link_libraries(renderer_EGL
|
|
|
|
PkgConfig::RENDERER_EGL_OPT
|
|
|
|
)
|
|
|
|
endif()
|
2019-03-28 00:02:36 +00:00
|
|
|
|
2019-03-28 08:56:14 +00:00
|
|
|
target_include_directories(renderer_EGL
|
2019-03-28 00:02:36 +00:00
|
|
|
PRIVATE
|
|
|
|
src
|
2019-03-28 03:59:54 +00:00
|
|
|
${EGL_SHADER_INCS}
|
2019-03-28 00:02:36 +00:00
|
|
|
)
|