Should fix emscripten build in Travis
This commit is contained in:
@@ -93,7 +93,7 @@ if(NOT backend_sdl AND UNIX AND NOT ANDROID AND NOT IOS)
|
||||
endif()
|
||||
|
||||
#third party build options
|
||||
WAGIC_OPTION(BUILD_ZLIB "build zlib from source" WIN32 OR APPLE OR EMSCRIPTEN)
|
||||
WAGIC_OPTION(BUILD_ZLIB "build zlib from source" WIN32 OR APPLE)
|
||||
WAGIC_OPTION(BUILD_JPEG "build jpeg from source" (WIN32 OR APPLE OR PSP OR ANDROID OR EMSCRIPTEN))
|
||||
WAGIC_OPTION(BUILD_PNG "build png from source" (WIN32 OR APPLE OR PSP OR ANDROID OR EMSCRIPTEN))
|
||||
WAGIC_OPTION(BUILD_UNZIP "build unzip from source" ON)
|
||||
|
||||
@@ -101,12 +101,13 @@ macro(FindOrBuildZLIB)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/zlib)
|
||||
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/zlib ${CMAKE_BINARY_DIR}/thirdparty/zlib)
|
||||
set(ZLIB_LIBRARIES zlib)
|
||||
else()
|
||||
else()
|
||||
if(WIN32)
|
||||
set(ZLIB_ROOT ${CMAKE_SOURCE_DIR}/thirdparty/binary/win)
|
||||
find_package(ZLIB)
|
||||
else()
|
||||
if(backend_qt_console OR backend_qt_widget)
|
||||
if(backend_qt_console OR backend_qt_widget OR EMSCRIPTEN)
|
||||
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/zlib)
|
||||
else()
|
||||
find_package(ZLIB)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s FULL_ES2=1 -std=c++11 -O1 -s ALLOW_MEMORY_GROWTH=1 --preload-file ../../../projects/mtg/bin/Res@/")
|
||||
set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s USE_ZLIB=1 -s FULL_ES2=1 -std=c++11 -O1 -s ALLOW_MEMORY_GROWTH=1 --preload-file ../../../projects/mtg/bin/Res@/")
|
||||
#set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s FULL_ES2=1 -std=c++11 -g4 -s ALLOW_MEMORY_GROWTH=1 --preload-file ../../../projects/mtg/bin/Res@/")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||
add_definitions(-DLINUX)
|
||||
|
||||
Reference in New Issue
Block a user