如何构建Openscenegraph earth 2.6
How to build Openscenegraph earth 2.6
很抱歉我的英语不好。。
我正在努力让osgEarth与c++和visualstudio2013合作。
我首先从这个页面下载了Open Scene Graph 3.2和预构建依赖项(小程序包)。我生成了visualstudio2013项目,并在没有太多问题的情况下构建/安装了开放场景图。
之后,我下载了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配合使用。。
提前感谢!
好吧,如果你不想用Qt构建,你可以忽略Qt位。
我认为osgEarth非常需要ZLIB,或者至少,我一直用它来构建。
确保您在CMake中的ZLIB条目正常:
我的看起来像ZLIB_INCLUDE_DIR C:/bah/bah/windows-VS10.0.30319-x86-release/INCLUDEZLIB_LIBRARY C:/bah/bah/windows-VS10.0.30319-x86-release/lib/ZLIB.lib
看看这是否解决了一些问题。我不熟悉安装目标错误,但谷歌搜索表明:CMake错误:目标没有给定共享库目标的库目的地
它可能是一个损坏的CMake文件。请确保您使用的是osgEarth 2.6的HEAD版本,以防在2.6标记版本之后出现错误修复。
相关文章:
- 如何在 OpenSceneGraph 中缩放/旋转/移动资产
- 如何在Openscenegraph中从二维鼠标点击的屏幕坐标点计算三维点(世界坐标)
- 为什么OpenSceneGraph将所有Sampler2D映射到第一个纹理
- 如何在 osg::Geometry 上设置光泽度,而无需在 OpenSceneGraph 中设置材质
- OpenSceneGraph不加载OpenFlight插件
- 如何处理 OpenSceneGraph 键盘输入事件中的区分大小写
- 在实现OpenSceneGraph时在Qt中获取引用问题
- 获取无效或损坏的文件LNK1107:尝试链接 OpenSceneGraph 教程.dll时无法0x378读取
- OpenSceneGraph、HUD 和 Textured Qt Widget 问题
- C++ OpenSceneGraph 更改相机眼睛高度
- 使用 Openscenegraph 加载纹理时出错
- 使用OpenSceneGraph加载DirectX模型文件
- 自定义C Linux应用程序中的Google Earth
- 重置场景时OpenSceneGraph内存使用情况
- 未定义的引用openscenegraph
- OpenSceneGraph浮动图像
- 使用OpenSceneGraph创建和导出球体
- 在OpenSceneGraph中创建球体(使用osg::Geometry)
- 如何在OpenSceneGraph中使用windows原始输入
- 如何构建Openscenegraph earth 2.6