cmake: Require Emscripten before building the sandbox (fixes
As a bonus, ask the user if they (as I have often done) forgot to
source the environment first.
@@ -44,6 +44,10 @@ add_subdirectory(run)
add_subdirectory(test)
if(WITH_SANDBOX)
+ if("$ENV{EMSCRIPTEN}" STREQUAL "")
+ message(FATAL_ERROR
+ "The sandbox can't be built without Emscripten. Did you forget to source emsdk_env?")
+ endif()
add_subdirectory(sandbox)
endif(WITH_SANDBOX)
