Fix building SDL with -DVIDEO_OPENGLES=On for any build

This commit is contained in:
IR4T4 2018-10-31 14:40:13 +01:00 committed by GitHub
parent 48d4d45a0e
commit fc14e44030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -573,6 +573,13 @@ endif()
# Copy bundled SDL library to the etl.exe location # Copy bundled SDL library to the etl.exe location
#----------------------------------------------------------------- #-----------------------------------------------------------------
if(BUNDLED_SDL AND BUILD_CLIENT) if(BUNDLED_SDL AND BUILD_CLIENT)
# GL render builds (not GLES) for RPI require VIDEO_OPENGLES=1
if(ARM AND NOT FEATURE_RENDERER_GLES)
set(SDL_WITH_GLES, "ON")
else()
set(SDL_WITH_GLES, "${SDL_WITH_GLES}")
endif()
# ${CMAKE_CURRENT_BINARY_DIR}/libs/sdl2 # ${CMAKE_CURRENT_BINARY_DIR}/libs/sdl2
# ${PROJECT_BINARY_DIR}/sdl2 # ${PROJECT_BINARY_DIR}/sdl2
ExternalProject_Add(bundled_sdl ExternalProject_Add(bundled_sdl
@ -582,7 +589,7 @@ if(BUNDLED_SDL AND BUILD_CLIENT)
BINARY_DIR ${LIBS_BINARYDIR_DIR}/sdl2 BINARY_DIR ${LIBS_BINARYDIR_DIR}/sdl2
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_OSX_DEPLOYMENT_TARGET="10.7" -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_OSX_DEPLOYMENT_TARGET="10.7"
-DSDL_SHARED=OFF -DSDL_RENDER=OFF -DRENDER_D3D=OFF -DFORCE_STATIC_VCRT=ON -DVIDEO_OPENGLES=${SDL_WITH_GLES} -DSDL_SHARED=OFF -DSDL_RENDER=OFF -DRENDER_D3D=OFF -DFORCE_STATIC_VCRT=ON
-DCMAKE_INSTALL_PREFIX=${LIBS_BINARYDIR_DIR}/sdl2 -DCMAKE_INSTALL_PREFIX=${LIBS_BINARYDIR_DIR}/sdl2
PREFIX ${LIBS_BINARYDIR_DIR}/sdl2 PREFIX ${LIBS_BINARYDIR_DIR}/sdl2
) )