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

Commit 317b2bf

Browse files
committed
[build] Use a submodule for mapbox-gl-js rather than an npm dependency
1 parent 531c983 commit 317b2bf

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@
1212
[submodule "platform/ios/uitest/OHHTTPStubs"]
1313
path = platform/ios/uitest/OHHTTPStubs
1414
url = https://github.com/AliSoftware/OHHTTPStubs.git
15+
[submodule "mapbox-gl-js"]
16+
path = mapbox-gl-js
17+
url = git://github.com/mapbox/mapbox-gl-js.git

CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ if(NOT EXISTS ".mason/mason.cmake")
1010
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
1111
endif()
1212

13+
if(NOT EXISTS "mapbox-gl-js/package.json")
14+
execute_process(
15+
COMMAND git submodule update --init mapbox-gl-js
16+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
17+
endif()
18+
1319
include(.mason/mason.cmake)
1420

1521
option(WITH_CXX11ABI "Use cxx11abi mason packages" OFF)

cmake/shaders.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function(add_shader VAR name)
22
set(shader_build_cmd ${NodeJS_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/build-shaders.js)
3-
set(shader_file_prefix ${CMAKE_SOURCE_DIR}/node_modules/mapbox-gl/shaders)
3+
set(shader_file_prefix ${CMAKE_SOURCE_DIR}/mapbox-gl-js/shaders)
44
set(shader_source_prefix ${MBGL_GENERATED}/include/mbgl/shader)
55

66
add_custom_command(

mapbox-gl-js

Submodule mapbox-gl-js added at ef5582d

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"ejs": "^2.4.1",
2323
"express": "^4.11.1",
2424
"lodash": "^4.16.4",
25-
"mapbox-gl": "mapbox/mapbox-gl-js#ef5582dd3bc5c15a3112e875ed66494dab8e9d0b",
2625
"mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#49e8b407bdbbe6f7c92dbcb56d3d51f425fc2653",
2726
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#da53a81453068f4c2b440f9077d6bd5e7e14ff3d",
2827
"mkdirp": "^0.5.1",

0 commit comments

Comments
 (0)