Compare commits
No commits in common. "38d17dd0801f922b1311b822d2243eb528af9725" and "3dcbd2e9032867a0aa1961a1016790dd61d424a0" have entirely different histories.
38d17dd080
...
3dcbd2e903
@ -3,7 +3,7 @@ project(gles-compatibility-layer)
|
|||||||
|
|
||||||
# Build
|
# Build
|
||||||
add_library(gles-compatibility-layer STATIC src/state.c src/passthrough.c src/matrix.c src/draw.c)
|
add_library(gles-compatibility-layer STATIC src/state.c src/passthrough.c src/matrix.c src/draw.c)
|
||||||
target_link_libraries(gles-compatibility-layer m)
|
target_link_libraries(gles-compatibility-layer m SDL)
|
||||||
target_include_directories(gles-compatibility-layer PUBLIC include)
|
target_include_directories(gles-compatibility-layer PUBLIC include)
|
||||||
# Shaders
|
# Shaders
|
||||||
include(cmake/util.cmake)
|
include(cmake/util.cmake)
|
||||||
@ -11,23 +11,3 @@ embed_resource(gles-compatibility-layer src/shaders/main.vsh)
|
|||||||
embed_resource(gles-compatibility-layer src/shaders/main.fsh)
|
embed_resource(gles-compatibility-layer src/shaders/main.fsh)
|
||||||
# Warnings
|
# Warnings
|
||||||
target_compile_options(gles-compatibility-layer PRIVATE -Wall -Wextra -Werror -Wpointer-arith -Wshadow -Wnull-dereference)
|
target_compile_options(gles-compatibility-layer PRIVATE -Wall -Wextra -Werror -Wpointer-arith -Wshadow -Wnull-dereference)
|
||||||
|
|
||||||
# GLFW/SDL
|
|
||||||
option(GLES_COMPATIBILITY_LAYER_USE_SDL "Use SDL" TRUE)
|
|
||||||
if(GLES_COMPATIBILITY_LAYER_USE_SDL)
|
|
||||||
target_compile_definitions(gles-compatibility-layer PUBLIC GLES_COMPATIBILITY_LAYER_USE_SDL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
set(GLES_COMPATIBILITY_LAYER_DEPENDENCY "" CACHE STRING "Compatibility Layer Dependency")
|
|
||||||
if(NOT GLES_COMPATIBILITY_LAYER_DEPENDENCY)
|
|
||||||
if(gles-compatibility-layer)
|
|
||||||
find_package(SDL2 REQUIRED)
|
|
||||||
target_link_libraries(gles-compatibility-layer SDL2::SDL2)
|
|
||||||
else()
|
|
||||||
find_package(glfw3 3.3 REQUIRED)
|
|
||||||
target_link_libraries(gles-compatibility-layer glfw)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
target_link_libraries(gles-compatibility-layer "${GLES_COMPATIBILITY_LAYER_DEPENDENCY}")
|
|
||||||
endif()
|
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
#ifdef GLES_COMPATIBILITY_LAYER_USE_SDL
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#else
|
|
||||||
#define GLFW_INCLUDE_NONE
|
|
||||||
#include <GLFW/glfw3.h>
|
|
||||||
#define SDL_GL_GetProcAddress glfwGetProcAddress
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user