win10 + cmake3.17 编译 giflib5.2.1

所有源文件已经打包上传csdn,大家可自行下载。


1. 下载giflib5.2.1,解压。

        下载地址:GIFLIB - Browse Files at SourceForge.net

2. 下载CMakeLists.txt 及其他依赖的文件

从github上的osg-3rdparty-cmake项目:

https://github.com/bjornblissing/osg-3rdparty-cmake/tree/master/giflib

下载giflib文件夹下的文件:

以上5个文件都要下载。或者可以下载整个项目的所有代码,然后取出对应这部分的代码。

下载以上5个文件后,拷贝到步骤1下载的giflib的源码目录中。

3. 修改CMakeLists.txt

用notepad++打开CMakeLists.txt,只需要在顶部添加一行代码即可:

set(GIFLIB_SOURCE_DIR "./")

4. 开始常规的cmake-gui编译流程(以下引自github: osg-3rdparty-cmake

  1. Download the CMake scripts from this repository.
  2. Download the source for the dependencies you would like to use from their respective location as specified below.
  3. Start the CMake GUI and select the directory with the CMake scripts as your source directory. Use any desired output directory as binary directory.
  4. Press Configure inside the CMake GUI.
  5. Fill in the location of the downloaded sources of your desired dependencies and press "Configure" again. Repeat until there is no more errors and warnings in CMake.
  6. Press Generate inside the CMake GUI. This will generate solution file inside your binary directory.
  7. Open the solution file in your IDE.
  8. Build the ALL_BUILD project for both debug and release.
  9. Build the INSTALL project for both debug and release.

 5. 完毕

6. 编译结果

7. 编译结果下载

https://download.csdn.net/download/Strive_For_Future/88504621

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值