aboutsummaryrefslogtreecommitdiff
path: root/cmake/Platform/Emscripten_unix.cmake
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-09 13:16:38 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-09 13:16:38 -0700
commit1d6d0572192981def4b7d4ec5d25285bb4d82183 (patch)
tree6bc603ee8f9a236ffeffbfdbb959f9972beed1d5 /cmake/Platform/Emscripten_unix.cmake
parent406687693664d4ddef53c1178fdfcef28999f2ad (diff)
parent77c1bced5ff6a4b4734ea7d327ea7a1c3ca70623 (diff)
Merge pull request #1583 from juj/cmake_improvements
Cmake improvements
Diffstat (limited to 'cmake/Platform/Emscripten_unix.cmake')
-rw-r--r--cmake/Platform/Emscripten_unix.cmake24
1 files changed, 0 insertions, 24 deletions
diff --git a/cmake/Platform/Emscripten_unix.cmake b/cmake/Platform/Emscripten_unix.cmake
deleted file mode 100644
index 92a21fd1..00000000
--- a/cmake/Platform/Emscripten_unix.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-
-# Try locating Emscripten root directory based on the location of this toolchain file.
-get_filename_component(GUESS_EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_FILE}/../../.." ABSOLUTE)
-if (EXISTS "${GUESS_EMSCRIPTEN_ROOT_PATH}/emcc")
- set(EMSCRIPTEN_ROOT_PATH "${GUESS_EMSCRIPTEN_ROOT_PATH}")
-endif()
-
-# If not found, try if the environment variable Emscripten was set.
-if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
- if ("$ENV{EMSCRIPTEN}" STREQUAL "")
- message(ERROR "Could not locate emcc and the environment variable EMSCRIPTEN has not been set! Please point it to Emscripten root directory!")
- else()
- set(EMSCRIPTEN_ROOT_PATH "$ENV{EMSCRIPTEN}")
- endif()
-endif()
-
-set(CMAKE_C_COMPILER "${EMSCRIPTEN_ROOT_PATH}/emcc")
-set(CMAKE_CXX_COMPILER "${EMSCRIPTEN_ROOT_PATH}/em++")
-set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar")
-set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib")
-
-include(${EMSCRIPTEN_ROOT_PATH}/cmake/Platform/Emscripten.cmake)