Fix CMake

This commit is contained in:
TheBrokenRail 2023-08-04 22:47:21 -04:00
parent 38d17dd080
commit 1fcbeb38e5

View File

@ -5,10 +5,12 @@ project(gles-compatibility-layer)
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)
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)
embed_resource(gles-compatibility-layer src/shaders/main.vsh) 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)
@ -20,8 +22,9 @@ endif()
# Dependencies # Dependencies
set(GLES_COMPATIBILITY_LAYER_DEPENDENCY "" CACHE STRING "Compatibility Layer Dependency") set(GLES_COMPATIBILITY_LAYER_DEPENDENCY "" CACHE STRING "Compatibility Layer Dependency")
if(NOT GLES_COMPATIBILITY_LAYER_DEPENDENCY) if(GLES_COMPATIBILITY_LAYER_DEPENDENCY STREQUAL "")
if(gles-compatibility-layer) message(FATAL_ERROR aaa)
if(GLES_COMPATIBILITY_LAYER_USE_SDL)
find_package(SDL2 REQUIRED) find_package(SDL2 REQUIRED)
target_link_libraries(gles-compatibility-layer SDL2::SDL2) target_link_libraries(gles-compatibility-layer SDL2::SDL2)
else() else()