Add mbgl-compiler-options to Node targets (#826)

This commit is contained in:
tdcosta100
2023-02-20 16:00:36 +00:00
committed by GitHub
parent 87337ddb66
commit 057f0342e5
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -192,7 +192,7 @@ void NodeMap::New(const Nan::FunctionCallbackInfo<v8::Value>& 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<node_mbgl::NodeFileSource>(
reinterpret_cast<node_mbgl::NodeMap*>(resourceOptions.platformContext()));
});