From 725d689e84d65bf1cc34601809ce0ecb61613daf Mon Sep 17 00:00:00 2001 From: Tom Finegan Date: Wed, 28 Aug 2019 10:10:46 -0700 Subject: [PATCH] draco cmake: Require the EMSCRIPTEN environment variable. Avoid a confusing failure mode for javascript builds by requiring that points at an existing directory. Prevents failure of custom commands late in the configure and build processes. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 67219e7..c5c0e09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,6 +187,11 @@ if(EMSCRIPTEN) FATAL_ERROR "Python required for Emscripten builds, but cmake cannot find it.") endif() + if(NOT EXISTS "$ENV{EMSCRIPTEN}") + message( + FATAL_ERROR + "The EMSCRIPTEN environment variable must be set. See README.md.") + endif() else() if(ENABLE_TESTS) if(MSVC) @@ -1011,7 +1016,8 @@ else() if(IOS) set(UNITY_TYPE STATIC) endif() - add_library(dracodec_unity ${UNITY_TYPE} + add_library(dracodec_unity + ${UNITY_TYPE} ${draco_version_sources} $ $