[我正在尝试使用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)
我需要heeeelp,我一直在这里尝试解决此问题,但我不知道可能是什么问题。。
谢谢你们!
如果您的ENV路径中定义了OpenGL库路径安装,您想要将CMAKE_PREFIX_PATH
设置为OpenGL安装路径(可以在顶级CMakeList.txt中进行设置)。