Add: Overlay cargo icon in vehicle/depot list when holding shift+ctrl. (#12938)
[openttd-github.git] / os / emscripten / cmake / FindLibLZMA.cmake
blob0880d62f70d53ffd235eab1aef1ecc5d05fa004c
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("
7     #include <lzma.h>
8     int main() { return 0; }"
9     LIBLZMA_FOUND
12 if (LIBLZMA_FOUND)
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"
17         )
18 else()
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.")
20 endif()