aboutsummaryrefslogtreecommitdiff
path: root/cmake/Platform/Emscripten_unix.cmake
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2012-11-12 22:25:12 +0200
committerJukka Jylänki <jujjyl@gmail.com>2012-11-12 22:25:12 +0200
commitf77bffef097538bd7889a62e818cd00f771d6c43 (patch)
treef0e9dbd3dc011c44135611a41cce731519ed7aae /cmake/Platform/Emscripten_unix.cmake
parentb8b117d4341a66317fc956dc0779229ef6882dd5 (diff)
Make separate cmake files for unix and windows cmake toolchains. On Windows, specifying the absolute path to emcc causes cmake to fail. On Linux, one must specify absolute path to emcc, or cmake fails. Moreover, since this is a toolchain file that is describing the system, no cmake variables seem to be available to query the platform, so make these separate.
Diffstat (limited to 'cmake/Platform/Emscripten_unix.cmake')
-rw-r--r--cmake/Platform/Emscripten_unix.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/Platform/Emscripten_unix.cmake b/cmake/Platform/Emscripten_unix.cmake
new file mode 100644
index 00000000..1e1d7fa9
--- /dev/null
+++ b/cmake/Platform/Emscripten_unix.cmake
@@ -0,0 +1,5 @@
+# On Unix platforms, we must specify the absolute path to emcc for cmake, having emcc in PATH will cause cmake to fail finding it.
+# The user must set the EMSCRIPTEN variable to point to the Emscripten root folder.
+
+file(TO_CMAKE_PATH "$ENV{EMSCRIPTEN/}" EMCC_PATH)
+include(Emscripten.cmake)