Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[build] Use a submodule for mapbox-gl-js rather than an npm dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Dec 22, 2016
1 parent 531c983 commit 317b2bf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
[submodule "platform/ios/uitest/OHHTTPStubs"]
path = platform/ios/uitest/OHHTTPStubs
url = https://github.com/AliSoftware/OHHTTPStubs.git
[submodule "mapbox-gl-js"]
path = mapbox-gl-js
url = git://github.com/mapbox/mapbox-gl-js.git
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ if(NOT EXISTS ".mason/mason.cmake")
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()

if(NOT EXISTS "mapbox-gl-js/package.json")
execute_process(
COMMAND git submodule update --init mapbox-gl-js
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()

include(.mason/mason.cmake)

option(WITH_CXX11ABI "Use cxx11abi mason packages" OFF)
Expand Down
2 changes: 1 addition & 1 deletion cmake/shaders.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function(add_shader VAR name)
set(shader_build_cmd ${NodeJS_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/build-shaders.js)
set(shader_file_prefix ${CMAKE_SOURCE_DIR}/node_modules/mapbox-gl/shaders)
set(shader_file_prefix ${CMAKE_SOURCE_DIR}/mapbox-gl-js/shaders)
set(shader_source_prefix ${MBGL_GENERATED}/include/mbgl/shader)

add_custom_command(
Expand Down
1 change: 1 addition & 0 deletions mapbox-gl-js
Submodule mapbox-gl-js added at ef5582
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"ejs": "^2.4.1",
"express": "^4.11.1",
"lodash": "^4.16.4",
"mapbox-gl": "mapbox/mapbox-gl-js#ef5582dd3bc5c15a3112e875ed66494dab8e9d0b",
"mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#49e8b407bdbbe6f7c92dbcb56d3d51f425fc2653",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#da53a81453068f4c2b440f9077d6bd5e7e14ff3d",
"mkdirp": "^0.5.1",
Expand Down

0 comments on commit 317b2bf

Please sign in to comment.