我正在尝试使用cmake构建Mapbox GL Native。因此,我从GitHub克隆了存储库:
$ git clone https://github.com/mapbox/mapbox-gl-native.git
$ cd mapbox-gl-native
$ mkdir build && cd build
$ cmake ./然后,它返回带有错误的代码:
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)我需要帮助,我一直在这里试图解决这个问题,但我不知道问题出在哪里。
谢谢你们!
发布于 2020-04-06 13:35:04
如果您的OpenGL库路径安装是在ENV路径中定义的,则需要将CMAKE_PREFIX_PATH设置为OpenGL安装路径(您可以在顶级CMakeList.txt中设置它)。
https://stackoverflow.com/questions/61049246
复制相似问题