osgEarth静态编译记录

更新时间2025-3-3

预计大小100G,使用vcpkg构建。编译耗时40min。

编译环境

Win11 x64 AMD Ryzen 9 7945HX with Radeon Graphics

需要从Github上下载源码文件

静态编译指令

编译前指令,osg默认使用GL2,若需要高版本opengl特性,在path\to\vcpkg\triplets\x64-windows.cmake中添加

set(osg_OPENGL_PROFILE GL3)#或者GLCORE

实现GL3编译,

使用vcpkg install osgearth:x64-windows-static 编译静态成静态库。如果需要Release和Debug版本,则需要vcpkg install osgearth:x64-windows-static --triplet=x64-windows-static进行安装编译。

编译完成后有二进制文件处理过程,花费时间较长

生成项目

生成工具CMake

编不下去了

最后修改:2025 年 03 月 08 日
如果觉得我的文章对你有用,请随意赞赏