[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
This commit is contained in:
parent
30604080ef
commit
ba066656f7
1 changed files with 6 additions and 6 deletions
|
@ -115,6 +115,12 @@ elseif ("${PLATFORM}" STREQUAL "DRM")
|
||||||
|
|
||||||
endif ()
|
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)
|
include_directories(BEFORE SYSTEM others/external/include)
|
||||||
|
|
||||||
if (NOT TARGET raylib)
|
if (NOT TARGET raylib)
|
||||||
|
@ -145,11 +151,5 @@ foreach (example_source ${example_sources})
|
||||||
endif ()
|
endif ()
|
||||||
endforeach ()
|
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
|
# Copy all of the resource files to the destination
|
||||||
file(COPY ${example_resources} DESTINATION "resources/")
|
file(COPY ${example_resources} DESTINATION "resources/")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue