Qt 5和OS X Mavericks的问题

7

我正在使用Cmake在OS X 10.9上构建一个QT项目。

自从Mavericks版本以来,OpenGL头文件的位置似乎发生了变化。/System/Library/Frameworks/OpenGL.framework/Headers文件夹现在已经不见了,而且cmake会提示:

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""."

他要求我在这个变量_qt5gui_OPENGL_INCLUDE_DIR中提供正确的路径,我尝试了他们显然将头文件移动到的路径:/System/Library/Frameworks/OpenGL.framework/Headers

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

但我仍然收到以下的CMake错误提示:
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)

现在我不知道该如何处理这个错误,有什么建议吗?

Qt 5.1.1发布时间早于Mavericks,因此可能会出现问题。 - Frank Osterfeld
1个回答

5

2
谢谢,其中一个安装程序起作用了:http://download.qt-project.org/development_releases/qt/5.2/5.2.0-beta1/ - kadrian

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接