Browse Source

Fix CMake build on Raspberry Pi OS Bullseye (#2548)

pull/2553/head
Richard Smith 2 years ago
committed by GitHub
parent
commit
3c3f08c416
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions
  1. +2
    -0
      cmake/GlfwImport.cmake
  2. +2
    -2
      cmake/LibraryConfigurations.cmake
  3. +5
    -0
      examples/CMakeLists.txt

+ 2
- 0
cmake/GlfwImport.cmake View File

@ -28,6 +28,8 @@ if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MAT
list(APPEND raylib_sources $<TARGET_OBJECTS:glfw>)
include_directories(BEFORE SYSTEM external/glfw/include)
elseif("${PLATFORM}" STREQUAL "DRM")
MESSAGE(STATUS "No GLFW required on PLATFORM_DRM")
else()
MESSAGE(STATUS "Using external GLFW")
set(GLFW_PKG_DEPS glfw3)

+ 2
- 2
cmake/LibraryConfigurations.cmake View File

@ -27,7 +27,7 @@ if (${PLATFORM} MATCHES "Desktop")
find_library(OSS_LIBRARY ossaudio)
endif ()
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
if (USE_AUDIO)
set(LIBS_PRIVATE ${LIBS_PRIVATE} dl)
@ -81,7 +81,7 @@ elseif (${PLATFORM} MATCHES "DRM")
if (NOT CMAKE_CROSSCOMPILING)
include_directories(/usr/include/libdrm)
endif ()
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} pthread m dl)
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread m dl)
endif ()

+ 5
- 0
examples/CMakeLists.txt View File

@ -106,6 +106,11 @@ elseif (${PLATFORM} MATCHES "Web")
# does not generate HTML+JS+WASM files, only a non-working
# and fat HTML
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
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)
endif ()
include_directories(BEFORE SYSTEM others/external/include)

Loading…
Cancel
Save