Skip to content

Commit

Permalink
[build] rework platform/default directory and add -files.txt for vend…
Browse files Browse the repository at this point in the history
…ored libs
  • Loading branch information
kkaefer committed Dec 14, 2018
1 parent c2a4a88 commit 1d8235f
Show file tree
Hide file tree
Showing 117 changed files with 6,473 additions and 768 deletions.
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ jobs:
steps:
- install-dependencies: { mason: false, ccache: false }
- run:
name: Initialize submodule
command: git submodule update --init mapbox-gl-js
name: Initialize submodules
command: git submodule update --init
- run:
name: Verify submodule pin
command: scripts/nitpick/submodule-pin.js
Expand Down
1 change: 0 additions & 1 deletion cmake/benchmark-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ benchmark/parse/vector_tile.benchmark.cpp
# util
benchmark/util/dtoa.benchmark.cpp
benchmark/util/tilecover.benchmark.cpp

2 changes: 1 addition & 1 deletion cmake/benchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ target_include_directories(mbgl-benchmark
PRIVATE src
PRIVATE benchmark/include
PRIVATE benchmark/src
PRIVATE platform/default
PRIVATE platform/default/include
)

target_link_libraries(mbgl-benchmark
Expand Down
1 change: 0 additions & 1 deletion cmake/core-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -802,4 +802,3 @@ src/mbgl/util/utf.hpp
src/mbgl/util/version.cpp
src/mbgl/util/version.hpp
src/mbgl/util/work_request.cpp

3 changes: 1 addition & 2 deletions cmake/files.txt.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
const groups = locals.groups;
-%>
# This file is generated. Do not edit. Regenerate this with scripts/generate-cmake-files.js

<% for (const key of Object.keys(groups).sort()) { -%>
# <%- key %>
<%- groups[key].sort().join('\n') %>
<% } -%>
28 changes: 14 additions & 14 deletions cmake/filesource-files.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# File source
include/mbgl/storage/default_file_source.hpp
platform/default/default_file_source.cpp
platform/default/mbgl/storage/file_source_request.hpp
platform/default/file_source_request.cpp
platform/default/src/mbgl/storage/default_file_source.cpp
platform/default/include/mbgl/storage/file_source_request.hpp
platform/default/src/mbgl/storage/file_source_request.cpp
include/mbgl/storage/online_file_source.hpp
platform/default/online_file_source.cpp
platform/default/src/mbgl/storage/online_file_source.cpp
src/mbgl/storage/http_file_source.hpp
src/mbgl/storage/asset_file_source.hpp
platform/default/asset_file_source.cpp
platform/default/src/mbgl/storage/asset_file_source.cpp
src/mbgl/storage/local_file_source.hpp
platform/default/local_file_source.cpp
platform/default/src/mbgl/storage/local_file_source.cpp

# Offline
include/mbgl/storage/offline.hpp
platform/default/mbgl/storage/offline.cpp
platform/default/mbgl/storage/offline_database.hpp
platform/default/mbgl/storage/offline_database.cpp
platform/default/mbgl/storage/offline_download.hpp
platform/default/mbgl/storage/offline_download.cpp
platform/default/mbgl/storage/offline_schema.hpp
platform/default/mbgl/storage/merge_sideloaded.hpp
platform/default/src/mbgl/storage/offline.cpp
platform/default/include/mbgl/storage/offline_database.hpp
platform/default/src/mbgl/storage/offline_database.cpp
platform/default/include/mbgl/storage/offline_download.hpp
platform/default/src/mbgl/storage/offline_download.cpp
platform/default/include/mbgl/storage/offline_schema.hpp
platform/default/include/mbgl/storage/merge_sideloaded.hpp

# Database
platform/default/sqlite3.hpp
platform/default/include/mbgl/storage/sqlite3.hpp
2 changes: 1 addition & 1 deletion cmake/filesource.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ add_library(mbgl-filesource STATIC ${MBGL_FILESOURCE_FILES})
target_include_directories(mbgl-filesource
PRIVATE include
PRIVATE src
PRIVATE platform/default
PRIVATE platform/default/include
)

target_link_libraries(mbgl-filesource
Expand Down
4 changes: 2 additions & 2 deletions cmake/glfw.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ target_sources(mbgl-glfw
PRIVATE platform/glfw/glfw_renderer_frontend.cpp
PRIVATE platform/glfw/settings_json.hpp
PRIVATE platform/glfw/settings_json.cpp
PRIVATE platform/default/mbgl/util/default_styles.hpp
PRIVATE platform/default/include/mbgl/util/default_styles.hpp
)

target_include_directories(mbgl-glfw
PRIVATE platform/default
PRIVATE platform/default/include
)

target_link_libraries(mbgl-glfw
Expand Down
6 changes: 3 additions & 3 deletions cmake/loop-uv.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
add_library(mbgl-loop-uv INTERFACE)

target_sources(mbgl-loop-uv INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/async_task.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/run_loop.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/timer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/src/mbgl/util/async_task.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/src/mbgl/util/run_loop.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/src/mbgl/util/timer.cpp
)

target_include_directories(mbgl-loop-uv INTERFACE
Expand Down
8 changes: 4 additions & 4 deletions cmake/node.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ include(node_modules/@mapbox/cmake-node-module/module.cmake)
add_library(mbgl-loop-node INTERFACE)

target_sources(mbgl-loop-node INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/async_task.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/run_loop.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/timer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/src/mbgl/util/async_task.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/src/mbgl/util/run_loop.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/src/mbgl/util/timer.cpp
)

target_include_directories(mbgl-loop-node INTERFACE
Expand Down Expand Up @@ -49,7 +49,7 @@ target_sources(mbgl-node INTERFACE
)

target_include_directories(mbgl-node INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/platform/default
${CMAKE_CURRENT_SOURCE_DIR}/platform/default/include
)

target_link_libraries(mbgl-node INTERFACE
Expand Down
4 changes: 2 additions & 2 deletions cmake/offline.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ add_executable(mbgl-offline
)

target_sources(mbgl-offline
PRIVATE platform/default/mbgl/util/default_styles.hpp
PRIVATE platform/default/include/mbgl/util/default_styles.hpp
)

target_include_directories(mbgl-offline
PRIVATE platform/default
PRIVATE platform/default/include
)

target_link_libraries(mbgl-offline
Expand Down
2 changes: 1 addition & 1 deletion cmake/render.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ add_executable(mbgl-render
)

target_include_directories(mbgl-render
PRIVATE platform/default
PRIVATE platform/default/include
)

target_link_libraries(mbgl-render
Expand Down
1 change: 0 additions & 1 deletion cmake/test-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,3 @@ test/util/tile_range.test.cpp
test/util/timer.test.cpp
test/util/token.test.cpp
test/util/url.test.cpp

2 changes: 1 addition & 1 deletion cmake/test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ target_include_directories(mbgl-test
PRIVATE src
PRIVATE test/include
PRIVATE test/src
PRIVATE platform/default
PRIVATE platform/default/include
)

target_link_libraries(mbgl-test PRIVATE
Expand Down
4 changes: 2 additions & 2 deletions platform/android/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ macro(mbgl_platform_core)
target_sources_from_file(mbgl-core PRIVATE platform/android/core-files.txt)

target_include_directories(mbgl-core
PUBLIC platform/default
PUBLIC platform/default/include
PRIVATE platform/android
)

Expand Down Expand Up @@ -90,7 +90,7 @@ target_link_libraries(mapbox-gl
set(MBGL_TEST_TARGET_TYPE "library")
macro(mbgl_platform_test)
target_sources(mbgl-test
PRIVATE platform/default/mbgl/test/main.cpp
PRIVATE platform/default/src/mbgl/test/main.cpp

# Main test entry point
platform/android/src/test/main.jni.cpp
Expand Down
37 changes: 20 additions & 17 deletions platform/android/core-files.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# JNI overrides
platform/default/include/jni/string_conversion.hpp

# Loop
platform/android/src/async_task.cpp
platform/android/src/run_loop.cpp
Expand All @@ -12,25 +15,25 @@ platform/android/src/text/local_glyph_rasterizer_jni.hpp
platform/android/src/logging_android.cpp
platform/android/src/thread.cpp
platform/android/src/string_util.cpp
platform/default/bidi.cpp
platform/default/thread_local.cpp
platform/default/src/mbgl/text/bidi.cpp
platform/default/src/mbgl/util/thread_local.cpp
platform/android/src/unaccent.cpp
platform/default/unaccent.hpp
platform/default/utf.cpp
platform/default/include/mbgl/text/unaccent.hpp
platform/default/src/mbgl/util/utf.cpp

# Image handling
platform/default/png_writer.cpp
platform/default/src/mbgl/util/png_writer.cpp
platform/android/src/bitmap.cpp
platform/android/src/bitmap.hpp
platform/android/src/bitmap_factory.cpp
platform/android/src/bitmap_factory.hpp
platform/android/src/image.cpp

# Thread pool
platform/default/mbgl/util/shared_thread_pool.cpp
platform/default/mbgl/util/shared_thread_pool.hpp
platform/default/mbgl/util/default_thread_pool.cpp
platform/default/mbgl/util/default_thread_pool.hpp
platform/default/src/mbgl/util/shared_thread_pool.cpp
platform/default/include/mbgl/util/shared_thread_pool.hpp
platform/default/src/mbgl/util/default_thread_pool.cpp
platform/default/include/mbgl/util/default_thread_pool.hpp

# Rendering
platform/android/src/android_renderer_backend.cpp
Expand All @@ -39,12 +42,12 @@ platform/android/src/android_renderer_frontend.cpp
platform/android/src/android_renderer_frontend.hpp

# Snapshots (core)
platform/default/mbgl/gl/headless_backend.cpp
platform/default/mbgl/gl/headless_backend.hpp
platform/default/mbgl/gl/headless_frontend.cpp
platform/default/mbgl/gl/headless_frontend.hpp
platform/default/mbgl/map/map_snapshotter.cpp
platform/default/mbgl/map/map_snapshotter.hpp
platform/default/src/mbgl/gl/headless_backend.cpp
platform/default/include/mbgl/gl/headless_backend.hpp
platform/default/src/mbgl/gl/headless_frontend.cpp
platform/default/include/mbgl/gl/headless_frontend.hpp
platform/default/src/mbgl/map/map_snapshotter.cpp
platform/default/include/mbgl/map/map_snapshotter.hpp
platform/linux/src/headless_backend_egl.cpp

# Conversion C++ -> Java
Expand Down Expand Up @@ -74,7 +77,6 @@ platform/android/src/map/image.hpp
platform/android/src/style/android_conversion.hpp
platform/android/src/style/value.cpp
platform/android/src/style/value.hpp
platform/android/src/style/conversion/url_or_tileset.hpp

# Style
platform/android/src/style/transition_options.cpp
Expand Down Expand Up @@ -160,13 +162,13 @@ platform/android/src/geojson/line_string.hpp
platform/android/src/geojson/multi_line_string.cpp
platform/android/src/geojson/multi_line_string.hpp
platform/android/src/geojson/multi_point.cpp
platform/android/src/geojson/multi_point.hpp
platform/android/src/geojson/multi_polygon.cpp
platform/android/src/geojson/multi_polygon.hpp
platform/android/src/geojson/point.cpp
platform/android/src/geojson/point.hpp
platform/android/src/geojson/polygon.cpp
platform/android/src/geojson/polygon.hpp
platform/android/src/geojson/util.hpp

# Geometry
platform/android/src/geometry/lat_lng.cpp
Expand All @@ -191,6 +193,7 @@ platform/android/src/gson/json_primitive.hpp
# Annotation
platform/android/src/annotation/marker.cpp
platform/android/src/annotation/marker.hpp
platform/android/src/annotation/multi_point.hpp
platform/android/src/annotation/polygon.cpp
platform/android/src/annotation/polygon.hpp
platform/android/src/annotation/polyline.cpp
Expand Down
2 changes: 1 addition & 1 deletion platform/android/filesource-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ platform/android/src/offline/offline_region_status.cpp
platform/android/src/offline/offline_region_status.hpp

# Database
platform/default/sqlite3.cpp
platform/default/src/mbgl/storage/sqlite3.cpp
2 changes: 1 addition & 1 deletion platform/android/src/file_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <mbgl/storage/resource_transform.hpp>
#include <mbgl/util/logging.hpp>

#include <sqlite3.hpp>
#include <mbgl/storage/sqlite3.hpp>

#include "asset_manager_file_source.hpp"

Expand Down
4 changes: 2 additions & 2 deletions platform/android/src/jni.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "jni.hpp"

#include <mbgl/util/logging.hpp>
#include <src/style/formatted.hpp>
#include <src/style/formatted_section.hpp>

#include "annotation/marker.hpp"
#include "annotation/polygon.hpp"
Expand Down Expand Up @@ -46,6 +44,8 @@
#include "style/layers/layer_manager.hpp"
#include "style/sources/source.hpp"
#include "style/light.hpp"
#include "style/formatted.hpp"
#include "style/formatted_section.hpp"
#include "snapshotter/map_snapshotter.hpp"
#include "snapshotter/map_snapshot.hpp"
#include "text/collator_jni.hpp"
Expand Down
2 changes: 1 addition & 1 deletion platform/android/src/text/collator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <mbgl/text/language_tag.hpp>
#include <mbgl/util/platform.hpp>

#include <unaccent.hpp>
#include <mbgl/text/unaccent.hpp>

#include <jni/jni.hpp>

Expand Down
2 changes: 1 addition & 1 deletion platform/android/src/unaccent.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <unaccent.hpp>
#include <mbgl/text/unaccent.hpp>
#include <string>
#include "attach_env.hpp"
#include "text/collator_jni.hpp"
Expand Down
2 changes: 1 addition & 1 deletion platform/darwin/filesource-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ platform/darwin/src/http_file_source.mm
platform/darwin/src/MGLLoggingConfiguration.m

# Database
platform/default/sqlite3.cpp
platform/default/src/mbgl/storage/sqlite3.cpp
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ void setTempPath(const std::string&);
class Database {
private:
Database(std::unique_ptr<DatabaseImpl>);
Database(const Database &) = delete;
Database &operator=(const Database &) = delete;

public:
Database(const Database &) = delete;
Database &operator=(const Database &) = delete;
static mapbox::util::variant<Database, Exception> tryOpen(const std::string &filename, int flags = 0);
static Database open(const std::string &filename, int flags = 0);

Expand Down Expand Up @@ -154,12 +154,11 @@ class Query {
};

class Transaction {
private:
public:
Transaction(const Transaction&) = delete;
Transaction(Transaction&&) = delete;
Transaction& operator=(const Transaction&) = delete;

public:
enum Mode {
Deferred,
Immediate,
Expand All @@ -177,5 +176,5 @@ class Transaction {
bool needRollback = true;
};

}
}
} // namespace sqlite
} // namespace mapbox
File renamed without changes.
2 changes: 0 additions & 2 deletions platform/default/mbgl/storage/.clang-tidy

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include <mbgl/storage/offline_database.hpp>
#include <mbgl/storage/response.hpp>
#include <mbgl/storage/sqlite3.hpp>
#include <mbgl/util/compression.hpp>
#include <mbgl/util/io.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/logging.hpp>

#include "offline_schema.hpp"
#include "merge_sideloaded.hpp"
#include <mbgl/storage/offline_schema.hpp>
#include <mbgl/storage/merge_sideloaded.hpp>

#include "sqlite3.hpp"

namespace mbgl {

Expand Down
File renamed without changes.
Loading

0 comments on commit 1d8235f

Please sign in to comment.