diff --git a/CMakeLists.txt b/CMakeLists.txt index 20d877c9e73a..9c43a3b3ba7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -323,7 +323,11 @@ endif(BUILD_LUA_LIBS) ## JS if(BUILD_JS_LIBS) - add_subdirectory(cocos/scripting/js-bindings) + link_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/external/spidermonkey/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} + ) + + add_subdirectory(cocos/scripting/js-bindings) # build js tests if(BUILD_JS_TESTS)