Qt 5 and OS X Mavericks issues

女生的网名这么多〃 提交于 2019-12-07 04:18:40

问题


I'm using Cmake to build a QT project on OS X 10.9.

Since Mavericks, the location of the OpenGL headers seems to have changed. The folder /System/Library/Frameworks/OpenGL.framework/Headers is missing now, and cmake says

CMake Error at /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:8 (message):
  Failed to find "gl.h" in
  "/System/Library/Frameworks/OpenGL.framework/Headers"
  "/System/Library/Frameworks/AGL.framework/Headers""."

and asks me to provide the correct path in this variable _qt5gui_OPENGL_INCLUDE_DIR, which I tried with the path they apparently moved the headers to in Mavericks:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers

But I still get the following cmake error:

CMake Error at /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:15 (message):
  The imported target "Qt5::Gui" references the file

     "/System/Library/Frameworks/OpenGL.framework/Headers"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:57 (_qt5_Gui_check_file_exists)
  /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:64 (_qt5gui_find_extra_libs)
  /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:123 (include)
  CMakeLists.txt:40 (find_package)

Now I don't know what to do about this error, any ideas?


回答1:


You need Qt 5.2 and CMake 2.8.12:

https://codereview.qt-project.org/#change,69605

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1fce189e



来源:https://stackoverflow.com/questions/19756694/qt-5-and-os-x-mavericks-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!