mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 12:39:11 +00:00
Fix: [CMake] restore CMAKE_REQUIRED_FLAGS if you change it (#13393)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# 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(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
set(CMAKE_REQUIRED_FLAGS "--use-port=contrib.liblzma")
|
||||
|
||||
check_cxx_source_compiles("
|
||||
@@ -18,3 +19,5 @@ if (LIBLZMA_FOUND)
|
||||
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()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
|
||||
|
Reference in New Issue
Block a user