# HG changeset patch # User Wuzzy # Date 1558104870 -7200 # Node ID b35a036d6b9749804fa66b9bf9fd8f0042a3e52b # Parent dc50766f6d0c2bcee081e572b95debcee27e70a5 Disable VIDEOREC if trying to build it with BUILD_ENGINE_C in release builds diff -r dc50766f6d0c -r b35a036d6b97 CMakeLists.txt --- a/CMakeLists.txt Fri May 17 16:49:28 2019 +0200 +++ b/CMakeLists.txt Fri May 17 16:54:30 2019 +0200 @@ -51,6 +51,14 @@ option(NOVERSIONINFOUPDATE "Disable update of version_info.txt. To be used if source is in a git/repo that is NOT the hedgewars repo" OFF) +if(BUILD_ENGINE_C AND NOT NOVIDEOREC) + if((CMAKE_BUILD_TYPE MATCHES "RELEASE") OR (CMAKE_BUILD_TYPE MATCHES "RELWITHDEBUGINFO")) + message("NOTE: Video recorder support disabled. It's incompatible with BUILD_ENGINE_C") + set(BUILD_ENGINE_C ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) + else() + message("WARNING: Video recorder support is currently incompatible with BUILD_ENGINE_C, the video recorder won't work (but demos are fine)! See .") + endif() +endif() if(BUILD_ENGINE_JS) if(NOT CMAKE_TOOLCHAIN_FILE) message(FATAL_ERROR "Missing emscripten toolchain file\nClean your cache and rerun cmake with -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake_modules/Platform/Emscripten.cmake")