forked from mirror/OpenTTD
Codechange: upgrade Emscripten to 3.1.57 (#12526)
This also upgrades liblzma to 5.4.6, and uses the new ports.contrib system Emscripten 3.1.56 introduced.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# LibLZMA is a custom addition to the emscripten SDK, so it is possible
|
||||
# someone patched their SDK. Test out if the SDK supports LibLZMA.
|
||||
include(CheckCXXSourceCompiles)
|
||||
set(CMAKE_REQUIRED_FLAGS "-sUSE_LIBLZMA=1")
|
||||
set(CMAKE_REQUIRED_FLAGS "--use-port=contrib.liblzma")
|
||||
|
||||
check_cxx_source_compiles("
|
||||
#include <lzma.h>
|
||||
@@ -12,9 +12,9 @@ check_cxx_source_compiles("
|
||||
if (LIBLZMA_FOUND)
|
||||
add_library(LibLZMA::LibLZMA INTERFACE IMPORTED)
|
||||
set_target_properties(LibLZMA::LibLZMA PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "-sUSE_LIBLZMA=1"
|
||||
INTERFACE_LINK_LIBRARIES "-sUSE_LIBLZMA=1"
|
||||
INTERFACE_COMPILE_OPTIONS "--use-port=contrib.liblzma"
|
||||
INTERFACE_LINK_LIBRARIES "--use-port=contrib.liblzma"
|
||||
)
|
||||
else()
|
||||
message(WARNING "You are using an emscripten SDK without LibLZMA support. Many savegames won't be able to load in OpenTTD. Please apply 'emsdk-liblzma.patch' to your local emsdk installation.")
|
||||
message(WARNING "You are using an emscripten SDK without LibLZMA support. Many savegames won't be able to load in OpenTTD. Please copy liblzma.py to your ports/contrib folder in your local emsdk installation.")
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user