Files
@ r25528:52b815c03f32
Branch filter:
Location: cpp/openttd-patchpack/source/os/emscripten/cmake/FindLibLZMA.cmake - annotation
r25528:52b815c03f32
808 B
text/x-cmake
Codechange: use initializer_lists for the settings tables
Not using vectors as those require copying from the initializer list and that
makes unique_ptrs to the actual SettingDesc objects later impossible.
Not using vectors as those require copying from the initializer list and that
makes unique_ptrs to the actual SettingDesc objects later impossible.
r24439:3207de2680bf r25484:c5af4712cb7f r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf r24439:3207de2680bf | # 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()
|