From 057f0342e511e7f35b3e60df43731840de3a12d3 Mon Sep 17 00:00:00 2001 From: tdcosta100 Date: Mon, 20 Feb 2023 16:00:36 +0000 Subject: [PATCH] Add mbgl-compiler-options to Node targets (#826) --- platform/node/cmake/module.cmake | 2 +- platform/node/src/node_map.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/node/cmake/module.cmake b/platform/node/cmake/module.cmake index 90e8ce455..6cbc24db0 100644 --- a/platform/node/cmake/module.cmake +++ b/platform/node/cmake/module.cmake @@ -160,7 +160,7 @@ function(add_node_module NAME) ) endif() - target_link_libraries(${_TARGET} PRIVATE ${NAME}) + target_link_libraries(${_TARGET} PRIVATE ${NAME} mbgl-compiler-options) if(APPLE) # Ensures that linked symbols are loaded when the module is loaded instead of causing diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp index bc0ac2a70..a4d1e4886 100644 --- a/platform/node/src/node_map.cpp +++ b/platform/node/src/node_map.cpp @@ -192,7 +192,7 @@ void NodeMap::New(const Nan::FunctionCallbackInfo& info) { info.This()->SetInternalField(1, options); mbgl::FileSourceManager::get()->registerFileSourceFactory( - mbgl::FileSourceType::ResourceLoader, [](const mbgl::ResourceOptions& resourceOptions, const mbgl::ClientOptions& clientOptions) { + mbgl::FileSourceType::ResourceLoader, [](const mbgl::ResourceOptions& resourceOptions, const mbgl::ClientOptions&) { return std::make_unique( reinterpret_cast(resourceOptions.platformContext())); });