From 4c8ecd970990fa0f06d6c73428f76e6a954e8489 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Thu, 7 Mar 2024 13:00:32 -0500 Subject: [PATCH] cmake: Only build rlgl_standalone when on Desktop, and not shared libs --- examples/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index f10a4ecd4..922323674 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -113,10 +113,13 @@ elseif ("${PLATFORM}" STREQUAL "DRM") list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c) -elseif ("${PLATFORM}" STREQUAL "SDL") +endif () + +# The rlgl_standalone example only targets desktop, without shared libraries. +if (BUILD_SHARED_LIBS OR NOT ${PLATFORM} MATCHES "Desktop") list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c) -endif () +endif() include_directories(BEFORE SYSTEM others/external/include)