首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Mapbox GL Native不构建ubuntu18

Mapbox GL Native不构建ubuntu18
EN

Stack Overflow用户
提问于 2020-04-06 04:42:55
回答 1查看 199关注 0票数 1

我正在尝试使用cmake构建Mapbox GL Native。因此,我从GitHub克隆了存储库:

代码语言:javascript
复制
$ git clone https://github.com/mapbox/mapbox-gl-native.git
$ cd mapbox-gl-native
$ mkdir build && cd build
$ cmake ./

然后,它返回带有错误的代码:

代码语言:javascript
复制
CMake Error at node_modules/@mapbox/cmake-node-module/module.cmake:126 (add_library):
  Target "mbgl-node.abi-64" links to target "OpenGL::OpenGL" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  platform/node/CMakeLists.txt:9 (add_node_module)


CMake Error at node_modules/@mapbox/cmake-node-module/module.cmake:126 (add_library):
  Target "mbgl-node.abi-64" links to target "OpenGL::OpenGL" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  platform/node/CMakeLists.txt:9 (add_node_module)


CMake Error at node_modules/@mapbox/cmake-node-module/module.cmake:126 (add_library):
  Target "mbgl-node.abi-57" links to target "OpenGL::OpenGL" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  platform/node/CMakeLists.txt:9 (add_node_module)

我需要帮助,我一直在这里试图解决这个问题,但我不知道问题出在哪里。

谢谢你们!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-04-06 13:35:04

如果您的OpenGL库路径安装是在ENV路径中定义的,则需要将CMAKE_PREFIX_PATH设置为OpenGL安装路径(您可以在顶级CMakeList.txt中设置它)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61049246

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档