~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to cmake/Platform/Emscripten_unix.cmake

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-09-20 22:44:35 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130920224435-apuwj4fsl3fqv1a6
Tags: 1.5.6~20130920~6010666-1
* New snapshot release
* Update the list of supported architectures to the same as libv8
  (Closes: #723129)
* emlibtool has been removed from upstream.
* Fix warning syntax-error-in-dep5-copyright
* Refresh of the patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# On Unix platforms, we must specify the absolute path to emcc for cmake, having emcc in PATH will cause cmake to fail finding it.
2
 
# The user must set the EMSCRIPTEN variable to point to the Emscripten root folder.
3
 
 
4
 
# Try locating Emscripten root directory based on the location of this toolchain file.
5
 
get_filename_component(GUESS_EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_FILE}/../../.." ABSOLUTE)
6
 
if (EXISTS "${GUESS_EMSCRIPTEN_ROOT_PATH}/emcc")
7
 
        set(EMSCRIPTEN_ROOT_PATH "${GUESS_EMSCRIPTEN_ROOT_PATH}")
8
 
endif()
9
 
 
10
 
# If not found, try if the environment variable Emscripten was set.
11
 
if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
12
 
        if ("$ENV{EMSCRIPTEN}" STREQUAL "")
13
 
                message(ERROR "Could not locate emcc and the environment variable EMSCRIPTEN has not been set! Please point it to Emscripten root directory!")
14
 
        else()
15
 
                set(EMSCRIPTEN_ROOT_PATH "$ENV{EMSCRIPTEN}")
16
 
        endif()
17
 
endif()
18
 
 
19
 
set(CMAKE_C_COMPILER "${EMSCRIPTEN_ROOT_PATH}/emcc")
20
 
set(CMAKE_CXX_COMPILER "${EMSCRIPTEN_ROOT_PATH}/em++")
21
 
set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar")
22
 
set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib")
23
 
 
24
 
include(${EMSCRIPTEN_ROOT_PATH}/cmake/Platform/Emscripten.cmake)