summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRob Loach <[email protected]>2024-03-08 06:33:40 -0500
committerGitHub <[email protected]>2024-03-08 12:33:40 +0100
commitba066656f7be07f8f3f5e9028f053068789755a4 (patch)
tree516bf8ba7a50942cb9d305bd8117b465e8e71454
parent30604080ef15b5201083f0828b868f7580ff05b5 (diff)
downloadraylib-ba066656f7be07f8f3f5e9028f053068789755a4.tar.gz
raylib-ba066656f7be07f8f3f5e9028f053068789755a4.zip
[cmake] Disable SDL rlgl_standalone example (#3861)
* cmake: For SDL, disable rlgl_standalone * cmake: Only build rlgl_standalone when on Desktop, and not shared libs
-rw-r--r--examples/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index a9dc2c88..92232367 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -115,6 +115,12 @@ elseif ("${PLATFORM}" STREQUAL "DRM")
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()
+
include_directories(BEFORE SYSTEM others/external/include)
if (NOT TARGET raylib)
@@ -145,11 +151,5 @@ foreach (example_source ${example_sources})
endif ()
endforeach ()
-# For SDL, have rlgl_standalone link the glfw dependency.
-if ("${PLATFORM}" STREQUAL "SDL")
- find_package(glfw3 3.3 REQUIRED)
- target_link_libraries(rlgl_standalone glfw)
-endif()
-
# Copy all of the resource files to the destination
file(COPY ${example_resources} DESTINATION "resources/")