diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-09-03 16:08:54 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-09-04 10:42:05 +0300 |
commit | c51c5308b9d3243fec791fb39ca7691706b037e7 (patch) | |
tree | 5cb1fdd83071947ace7de1626c873c8fecb35bb4 /cmake | |
parent | 3b170ade86c57f3f073438d9c91d59ec56b9ae73 (diff) |
Remove the need to pass CMAKE_MODULE_PATH to CMake by weakly setting it in the toolchain file.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Platform/Emscripten.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/Platform/Emscripten.cmake b/cmake/Platform/Emscripten.cmake index c1da7e5b..082296f2 100644 --- a/cmake/Platform/Emscripten.cmake +++ b/cmake/Platform/Emscripten.cmake @@ -4,7 +4,6 @@ # To use this toolchain file with CMake, invoke CMake with the following command line parameters # cmake -DCMAKE_TOOLCHAIN_FILE=<EmscriptenRoot>/cmake/Platform/Emscripten.cmake -# -DCMAKE_MODULE_PATH=<EmscriptenRoot>/cmake # -DCMAKE_BUILD_TYPE=<Debug|RelWithDebInfo|Release|MinSizeRel> # -G "Unix Makefiles" (Linux and OSX) # -G "MinGW Makefiles" (Windows) @@ -43,7 +42,11 @@ endif() # Normalize, convert Windows backslashes to forward slashes or CMake will crash. get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE) -set(CMAKE_FIND_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}") +if ("${CMAKE_MODULE_PATH}" STREQUAL "") + set(CMAKE_MODULE_PATH "${EMSCRIPTEN_ROOT_PATH}/cmake") +endif() + +set(CMAKE_FIND_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}/cmake") if (CMAKE_HOST_WIN32) set(EMCC_SUFFIX ".bat") |