Add mbgl-compiler-options to Node targets (#826)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user