Skip to content

Commit

Permalink
Fix Linux build process
Browse files Browse the repository at this point in the history
Update to use SDL2 2.0.9
Add `XML_DEV_RANDOM` flag to expath linux build
Fix compilation error in `zl-gfx`
  • Loading branch information
Vaskivo committed Feb 5, 2019
1 parent b01816f commit 1462bfc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions cmake/cmake/third-party/expat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ if ( BUILD_HTML )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_MEMMOVE=1 " )
endif ( BUILD_HTML )

if ( BUILD_LINUX )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_MEMMOVE=1 -DXML_DEV_URANDOM" )
endif ( BUILD_LINUX )

set ( EXPAT_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}" )

file ( GLOB_RECURSE EXPAT_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.c" )
Expand Down
4 changes: 2 additions & 2 deletions cmake/cmake/third-party/sdl2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ cmake_minimum_required ( VERSION 3.0 )
project ( SDL2-static )
include(ExternalProject)

set (SDL2_SOURCE_DIR "${MOAI_ROOT}/3rdparty/sdl2-2.0.4")
set (SDL2_SOURCE_DIR "${MOAI_ROOT}/3rdparty/sdl2-2.0.9")
set (SDL2_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/binarydir")
ExternalProject_Add(sdl2
SOURCE_DIR "${SDL2_SOURCE_DIR}"
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install" -DSDL_SHARED=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DLIBC=ON
CMAKE_CACHE_ARGS "-DSDL2_SOURCE_DIR:string=${SDL2_SOURCE_DIR}" "-DSDL2_BINARY_DIR:string=${SDL2_BINARY_DIR}" "-DSDL_STATIC:bool=on" "-DSDL_SHARED:bool=off"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/sdl2-2.0.4"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/sdl2-2.0.9"
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/install"
)

Expand Down
2 changes: 1 addition & 1 deletion src/zl-gfx/ZLGfxDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void ZLGfxDevice::Initialize () {

// if framebuffer object is not in code, check to see if it's available as
// an extension and remap to core function pointers if so
if (( isOpenGLES == false ) && ( majorVersion < 3 )) {
if (( isOpenGLES == false ) && ( sMajorVersion < 3 )) {

if ( glewIsSupported ( "GL_EXT_framebuffer_object" )) {

Expand Down

0 comments on commit 1462bfc

Please sign in to comment.