summaryrefslogtreecommitdiff
path: root/cmake/Platform/Emscripten.cmake
diff options
context:
space:
mode:
authorjuj <jujjyl@gmail.com>2013-11-17 14:38:03 -0800
committerjuj <jujjyl@gmail.com>2013-11-17 14:38:03 -0800
commit1bbd1b77a924919d632d1efd2f661636f6bd451c (patch)
tree899054049ed214f0f790f3bfe7a62b322ab69b96 /cmake/Platform/Emscripten.cmake
parent458ac87fce25798093e389cece7a25d633ef1386 (diff)
parentee1537cfadab1312522120cb726a5d38ee0ed66c (diff)
Merge pull request #1824 from juj/fix_browser_harness_windows
Fix browser harness windows
Diffstat (limited to 'cmake/Platform/Emscripten.cmake')
-rw-r--r--cmake/Platform/Emscripten.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/Platform/Emscripten.cmake b/cmake/Platform/Emscripten.cmake
index e1e54ccf..c30632ca 100644
--- a/cmake/Platform/Emscripten.cmake
+++ b/cmake/Platform/Emscripten.cmake
@@ -44,9 +44,10 @@ endif()
# Normalize, convert Windows backslashes to forward slashes or CMake will crash.
get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE)
-if ("${CMAKE_MODULE_PATH}" STREQUAL "")
- set(CMAKE_MODULE_PATH "${EMSCRIPTEN_ROOT_PATH}/cmake")
+if (NOT CMAKE_MODULE_PATH)
+ set(CMAKE_MODULE_PATH "")
endif()
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${EMSCRIPTEN_ROOT_PATH}/cmake/Modules")
set(CMAKE_FIND_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}/cmake")
@@ -82,6 +83,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include")
+
# We would prefer to specify a standard set of Clang+Emscripten-friendly common convention for suffix files, especially for CMake executable files,
# but if these are adjusted, ${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake will fail, since it depends on being able to compile output files with predefined names.
#SET(CMAKE_LINK_LIBRARY_SUFFIX "")