简体   繁体   English

cmake 错误 [SDK/Util/CMakeLists.txt:132 (add_library) 处的 CMake 错误]

[英]cmake error [CMake Error at SDK/Util/CMakeLists.txt:132 (add_library)]

The following error occurs when the cmake that was running in a Windows environment is performed on Linux:在Linux上执行Windows环境下运行的cmake时出现如下错误:

Error message is (CMake GUI generate button click error message):错误消息是(CMake GUI 生成按钮单击错误消息):

CMake Error at SDK/A/Util/CMakeLists.txt:132 (add_library): Target "Util" links to target "VSI::GL" but the target was not found. SDK/A/Util/CMakeLists.txt:132 (add_library) 中的 CMake 错误:目标“Util”链接到目标“VSI::GL”,但未找到目标。 Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? IMPORTED 目标可能缺少 find_package() 调用,或者缺少 ALIAS 目标?

CMake Error at SDK/B/Vis/CMakeLists.txt:424 (add_library): Target "Util" links to target "VSI::GL" but the target was not found. SDK/B/Vis/CMakeLists.txt:424 (add_library) 中的 CMake 错误:目标“Util”链接到目标“VSI::GL”,但未找到目标。 Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? IMPORTED 目标可能缺少 find_package() 调用,或者缺少 ALIAS 目标?

The SDK/A/Util/CMakeLists.txt:132 is: SDK/A/Util/CMakeLists.txt:132 是:

    add_library(Util ${STATIC_OR_SHARED} ${UTIL_PROJECT_FILES}) 
    set_target_properties(Util PROPERTIES 
      FOLDER "SDK" 
      PROJECT_LABEL "SDK - Util" 
    ) 
    ApplySDKVersion(Util) 
    target_include_directories(Util PUBLIC 
      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> 
      $<INSTALL_INTERFACE:include> 
    ) 
    target_link_libraries(Util PUBLIC Vis Data Core) 
    target_link_libraries(Util PRIVATE VSI::GL) 
    if(UTIL_SHARED) 
      target_compile_definitions(Util PRIVATE Util_LIB_EXPORT_SHARED) 
    else() 
      target_compile_definitions(Util PUBLIC Util_LIB_EXPORT_STATIC) 
    endif() 

Does anyone know how to fix this?有谁知道如何解决这一问题?

Thanks for reading!.谢谢阅读!。

solved.解决了。

It was a problem with the external program.这是外部程序的问题。

In my case it was an OpenGL version issue.就我而言,这是一个 OpenGL 版本问题。

thank you for read!谢谢阅读!


additional infomation附加信息

I was using vmware.我用的是vmware。 vmware supports only openGL version 2.1 (not pro version) vmware 仅支持 openGL 2.1 版(非专业版)

So, after installing Centos myself, update the opengl version, the program worked fine.所以,在自己安装 Centos 后,更新 opengl 版本,程序运行良好。

I hope it helps a lot!我希望它有很大帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM