Fixed emscripten compilation

This commit is contained in:
Sergii Pylypenko
2021-12-13 22:57:59 +02:00
parent f21bf64f8f
commit 8909ce3d8c
8 changed files with 88 additions and 311 deletions

View File

@@ -1,20 +0,0 @@
# LibLZMA is a recent addition to the emscripten SDK, so it is possible
# someone hasn't updated their SDK yet. Test out if the SDK supports LibLZMA.
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_FLAGS "-sUSE_LIBLZMA=1")
check_cxx_source_compiles("
#include <lzma.h>
int main() { return 0; }"
LIBLZMA_FOUND
)
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"
)
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.")
endif()

View File

@@ -0,0 +1,4 @@
Name: harfbuzz
Description: HarfBuzz text shaping library
Version: 2.8.1
Libs: -lharfbuzz