1 # LibLZMA is a custom addition to the emscripten SDK, so it is possible
2 # someone patched their SDK. Test out if the SDK supports LibLZMA.
3 include(CheckCXXSourceCompiles)
4 set(CMAKE_REQUIRED_FLAGS "--use-port=contrib.liblzma")
6 check_cxx_source_compiles("
8 int main() { return 0; }"
13 add_library(LibLZMA::LibLZMA INTERFACE IMPORTED)
14 set_target_properties(LibLZMA::LibLZMA PROPERTIES
15 INTERFACE_COMPILE_OPTIONS "--use-port=contrib.liblzma"
16 INTERFACE_LINK_LIBRARIES "--use-port=contrib.liblzma"
19 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.")