mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-05 18:24:08 +00:00
[client] project restructure part 1/2
This commit is contained in:
11
client/renderers/CMakeLists.txt
Normal file
11
client/renderers/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(renderers LANGUAGES C)
|
||||
|
||||
add_subdirectory(opengl)
|
||||
add_subdirectory(egl)
|
||||
|
||||
add_library(renderers INTERFACE)
|
||||
target_link_libraries(renderers INTERFACE
|
||||
renderer_opengl
|
||||
renderer_egl
|
||||
)
|
31
client/renderers/egl/CMakeLists.txt
Normal file
31
client/renderers/egl/CMakeLists.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
project(renderer_egl LANGUAGES C)
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(RENDERER_EGL_PKGCONFIG REQUIRED
|
||||
egl
|
||||
wayland-egl
|
||||
)
|
||||
|
||||
add_library(renderer_egl STATIC
|
||||
egl.c
|
||||
shader.c
|
||||
texture.c
|
||||
model.c
|
||||
desktop.c
|
||||
cursor.c
|
||||
fps.c
|
||||
draw.c
|
||||
splash.c
|
||||
alert.c
|
||||
)
|
||||
|
||||
target_link_libraries(renderer_egl
|
||||
${RENDERER_EGL_PKGCONFIG_LIBRARIES}
|
||||
)
|
||||
|
||||
target_include_directories(renderer_egl
|
||||
PRIVATE
|
||||
src
|
||||
${RENDERER_EGL_PKGCONFIG_INCLUDE_DIRS}
|
||||
)
|
@@ -20,7 +20,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "lg-renderer.h"
|
||||
|
||||
#include "interface/renderer.h"
|
||||
|
||||
typedef struct EGL_Cursor EGL_Cursor;
|
||||
|
||||
|
@@ -21,7 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "lg-renderer.h"
|
||||
#include "interface/renderer.h"
|
||||
|
||||
typedef struct EGL_Desktop EGL_Desktop;
|
||||
|
||||
|
@@ -17,7 +17,7 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "lg-renderer.h"
|
||||
#include "interface/renderer.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "utils.h"
|
||||
@@ -30,13 +30,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include <wayland-egl.h>
|
||||
#endif
|
||||
|
||||
#include "egl/model.h"
|
||||
#include "egl/shader.h"
|
||||
#include "egl/desktop.h"
|
||||
#include "egl/cursor.h"
|
||||
#include "egl/fps.h"
|
||||
#include "egl/splash.h"
|
||||
#include "egl/alert.h"
|
||||
#include "model.h"
|
||||
#include "shader.h"
|
||||
#include "desktop.h"
|
||||
#include "cursor.h"
|
||||
#include "fps.h"
|
||||
#include "splash.h"
|
||||
#include "alert.h"
|
||||
|
||||
#define SPLASH_FADE_TIME 1000000
|
||||
#define ALERT_TIMEOUT 2000000
|
22
client/renderers/opengl/CMakeLists.txt
Normal file
22
client/renderers/opengl/CMakeLists.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
project(renderer_opengl LANGUAGES C)
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(RENDERER_OPENGL_PKGCONFIG REQUIRED
|
||||
gl
|
||||
glu
|
||||
)
|
||||
|
||||
add_library(renderer_opengl STATIC
|
||||
opengl.c
|
||||
)
|
||||
|
||||
target_link_libraries(renderer_opengl
|
||||
${RENDERER_OPENGL_PKGCONFIG_LIBRARIES}
|
||||
)
|
||||
|
||||
target_include_directories(renderer_opengl
|
||||
PRIVATE
|
||||
src
|
||||
${RENDERER_OPENGL_PKGCONFIG_INCLUDE_DIRS}
|
||||
)
|
@@ -17,7 +17,7 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "lg-renderer.h"
|
||||
#include "interface/renderer.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
Reference in New Issue
Block a user