QT5.4.1+VS2012+OSG3.2.3+osgearth2.7編譯問題總結

問題1:在cmake中配置QT變量的時候出現如下問題:

CMake Warning at CMakeLists.txt:5 (FIND_PACKAGE):
  By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Widgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Widgets" with
  any of the following names:

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake

  Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
  "Qt5Widgets_DIR" to a directory containing one of the above files.  If
  "Qt5Widgets" provides a separate development package or SDK, be sure it has
  been installed.

詳細的解決方案:http://stackoverflow.com/questions/15639781/how-to-find-qt5-cmake-module-on-windows

set (CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.0.1\\5.0.1\\msvc2010\\")
成功編譯完成QT版本的osg3.2.3

然後編譯osgearth 2.7。

運行osgearth Qt.最終的現實結果如下圖:


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章