From c6f1947c1b0df71128bfb702ff1a949be5846ac0 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Fri, 4 Aug 2023 22:47:21 -0400 Subject: [PATCH] Fix CMake --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28eb52d..c3b9b5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) target_link_libraries(gles-compatibility-layer m) target_include_directories(gles-compatibility-layer PUBLIC include) + # Shaders include(cmake/util.cmake) embed_resource(gles-compatibility-layer src/shaders/main.vsh) embed_resource(gles-compatibility-layer src/shaders/main.fsh) + # Warnings target_compile_options(gles-compatibility-layer PRIVATE -Wall -Wextra -Werror -Wpointer-arith -Wshadow -Wnull-dereference) @@ -20,8 +22,8 @@ endif() # Dependencies set(GLES_COMPATIBILITY_LAYER_DEPENDENCY "" CACHE STRING "Compatibility Layer Dependency") -if(NOT GLES_COMPATIBILITY_LAYER_DEPENDENCY) - if(gles-compatibility-layer) +if(GLES_COMPATIBILITY_LAYER_DEPENDENCY STREQUAL "") + if(GLES_COMPATIBILITY_LAYER_USE_SDL) find_package(SDL2 REQUIRED) target_link_libraries(gles-compatibility-layer SDL2::SDL2) else()