You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
# 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 "--use-port=contrib.liblzma" )
check_cxx_source_compiles ( "
#include <lzma.h>
i n t main ( ) { r e t u r n 0 ; } "
L I B L Z M A _ F O U N D
)
if ( LIBLZMA_FOUND )
add_library ( LibLZMA::LibLZMA INTERFACE IMPORTED )
set_target_properties ( LibLZMA::LibLZMA PROPERTIES
I N T E R F A C E _ C O M P I L E _ O P T I O N S " - - u s e - p o r t = c o n t r i b . l i b l z m a "
I N T E R F A C E _ L I N K _ L I B R A R I E S " - - u s e - p o r t = c o n t r i b . l i b l z m a "
)
else ( )
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 ( )