【问题标题】:How to build Openscenegraph earth 2.6如何构建 Openscenegraph 地球 2.6
【发布时间】:2014-11-08 08:51:11
【问题描述】:

对不起我的英语不好..

我正在尝试让 osgEarth 与 c++ 和 Visual Studio 2013 一起使用。

我首先从这个页面下载了 Open Scene Graph 3.2 和预构建依赖项(小包)。我生成了 Visual Studio 2013 项目并构建/安装了 Open Scene Graph,没有太多问题。

之后,我下载了 osgearth 2.6 的源代码,当我尝试创建 Visual Studio 解决方案时,我遇到了一些错误:

    Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
CMake Warning at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindQt4.cmake:616 (message):
  c:/lib/Qt/5.3.2/5.3/msvc2013_opengl/bin/qmake.exe reported QT_INSTALL_LIBS
  as "C:/lib/Qt/5.3.2/5.3/msvc2013_opengl/lib" but QtCore could not be found
  there.  Qt is NOT installed correctly for the target build environment.
Call Stack (most recent call first):
  CMakeLists.txt:147 (FIND_PACKAGE)


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgEarth".
Call Stack (most recent call first):
  src/osgEarth/CMakeLists.txt:304 (INCLUDE)


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgEarthAnnotation".
Call Stack (most recent call first):
  src/osgEarthAnnotation/CMakeLists.txt:89 (INCLUDE)


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgEarthFeatures".
Call Stack (most recent call first):
  src/osgEarthFeatures/CMakeLists.txt:117 (INCLUDE)


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgEarthUtil".
Call Stack (most recent call first):
  src/osgEarthUtil/CMakeLists.txt:185 (INCLUDE)


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgEarthSymbology".
Call Stack (most recent call first):
  src/osgEarthSymbology/CMakeLists.txt:122 (INCLUDE)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_earth".
Call Stack (most recent call first):
  src/osgEarthDrivers/earth/CMakeLists.txt:28 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_kml".
Call Stack (most recent call first):
  src/osgEarthDrivers/kml/CMakeLists.txt:92 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_wcs".
Call Stack (most recent call first):
  src/osgEarthDrivers/wcs/CMakeLists.txt:26 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_wms".
Call Stack (most recent call first):
  src/osgEarthDrivers/wms/CMakeLists.txt:13 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_tilecache".
Call Stack (most recent call first):
  src/osgEarthDrivers/tilecache/CMakeLists.txt:9 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_tileservice".
Call Stack (most recent call first):
  src/osgEarthDrivers/tileservice/CMakeLists.txt:8 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_yahoo".
Call Stack (most recent call first):
  src/osgEarthDrivers/yahoo/CMakeLists.txt:3 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_arcgis_map_cache".
Call Stack (most recent call first):
  src/osgEarthDrivers/arcgis_map_cache/CMakeLists.txt:2 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_arcgis".
Call Stack (most recent call first):
  src/osgEarthDrivers/arcgis/CMakeLists.txt:14 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_tms".
Call Stack (most recent call first):
  src/osgEarthDrivers/tms/CMakeLists.txt:12 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_vpb".
Call Stack (most recent call first):
  src/osgEarthDrivers/vpb/CMakeLists.txt:9 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_osg".
Call Stack (most recent call first):
  src/osgEarthDrivers/osg/CMakeLists.txt:7 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_agglite".
Call Stack (most recent call first):
  src/osgEarthDrivers/agglite/CMakeLists.txt:11 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_model_simple".
Call Stack (most recent call first):
  src/osgEarthDrivers/model_simple/CMakeLists.txt:4 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_debug".
Call Stack (most recent call first):
  src/osgEarthDrivers/debug/CMakeLists.txt:4 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_cache_filesystem".
Call Stack (most recent call first):
  src/osgEarthDrivers/cache_filesystem/CMakeLists.txt:12 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_refresh".
Call Stack (most recent call first):
  src/osgEarthDrivers/refresh/CMakeLists.txt:8 (SETUP_PLUGIN)


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "osgdb_osgearth_xyz".
Call Stack (most recent call first):
  src/osgEarthDrivers/xyz/CMakeLists.txt:10 (SETUP_PLUGIN)
...
ZLIB_LIBRARY (ADVANCED)
    linked by target "osgEarth" in directory C:/Users/***/Desktop/OSG/osgearth-osgearth-2.6/src/osgEarth

Configuring incomplete, errors occurred!
See also "C:/Users/Dario/Desktop/OSG/TempBuild/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Dario/Desktop/OSG/TempBuild/CMakeFiles/CMakeError.log".

我使用了与 Osg 配合良好的相同预构建依赖包..

提前致谢!

【问题讨论】:

    标签: c++ build cmake openscenegraph


    【解决方案1】:

    好吧,如果您不尝试使用 Qt 构建,则可以忽略 Qt 位。

    我认为 osgEarth 非常需要 ZLIB,或者至少,我一直使用它构建。

    确保在 CMake 中找到您的 ZLIB 条目正常:

    我的样子 ZLIB_INCLUDE_DIR C:/blah/blah/windows-VS10.0.30319-x86-release/include ZLIB_LIBRARY C:/blah/blah/windows-VS10.0.30319-x86-release/lib/zlib.lib

    看看这是否能解决一些问题。我不熟悉安装目标错误,但谷歌搜索建议: CMake Error: TARGETS given no LIBRARY DESTINATION for shared library target

    这可能是一个损坏的 CMake 文件。确保您使用的是 osgEarth 2.6 的 HEAD 版本,以防在 2.6 标记版本之后修复错误。

    【讨论】:

      猜你喜欢
      • 2012-04-30
      • 2012-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-09
      • 1970-01-01
      • 2015-04-06
      • 2020-03-05
      相关资源
      最近更新 更多