This commit is contained in:
parent
b0f3a2c217
commit
e87caa2687
@ -1,6 +1,18 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(raylib)
|
project(raylib)
|
||||||
|
|
||||||
|
# Avoid excessive expansion of variables in conditionals. In particular, if
|
||||||
|
# "PLATFORM" is "DRM" than:
|
||||||
|
#
|
||||||
|
# if (${PLATFORM} MATCHES "DRM")
|
||||||
|
#
|
||||||
|
# may expand e.g to:
|
||||||
|
#
|
||||||
|
# if (/usr/lib/aarch64-linux-gnu/libdrm.so MATCHES "DRM")
|
||||||
|
#
|
||||||
|
# See https://cmake.org/cmake/help/latest/policy/CMP0054.html
|
||||||
|
cmake_policy(SET CMP0054 NEW)
|
||||||
|
|
||||||
# Directory for easier includes
|
# Directory for easier includes
|
||||||
# Anywhere you see include(...) you can check <root>/cmake for that file
|
# Anywhere you see include(...) you can check <root>/cmake for that file
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
@ -65,7 +65,7 @@ elseif (${PLATFORM} MATCHES "Raspberry Pi")
|
|||||||
link_directories(/opt/vc/lib)
|
link_directories(/opt/vc/lib)
|
||||||
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${BCMHOST} pthread rt m dl)
|
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${BCMHOST} pthread rt m dl)
|
||||||
|
|
||||||
elseif (${PLATFORM} MATCHES "DRM")
|
elseif ("${PLATFORM}" MATCHES "DRM")
|
||||||
set(PLATFORM_CPP "PLATFORM_DRM")
|
set(PLATFORM_CPP "PLATFORM_DRM")
|
||||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ elseif (${PLATFORM} MATCHES "Web")
|
|||||||
# and fat HTML
|
# and fat HTML
|
||||||
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
|
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
|
||||||
|
|
||||||
elseif (${PLATFORM} STREQUAL "DRM")
|
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/rlgl_standalone.c)
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user