Compile ceres with SuiteSparse5.x & Metis5.1.0 Using CMake on Win10

在Win10上用CMake编译ceres(带SuiteSparse)

源代码链接

按如下链接下载源代码:
glog
gflags
eigen
suitesparse
ceres

CMake编译

请参考文章
**我就是想写这么个玩意,这篇比我写的好多了。

glog&gflags

参考文章:https://kezunlin.me/post/bb64e398/

suitesparse

下载最新的代码进行编译。

eigen

无需编译,解压即可。

ceres

注意设置下面标蓝色强调的内容
Compile ceres with SuiteSparse5.x & Metis5.1.0 Using CMake on Win10

如上图所示,点击config之后,如果cmake没有自动找到suite-sparse相关项,就要手动勾选这些内容(并且填上标蓝色部分之前编译过的库文件路径和包含路径等信息)。
效果如下图所示:
Compile ceres with SuiteSparse5.x & Metis5.1.0 Using CMake on Win10
Compile ceres with SuiteSparse5.x & Metis5.1.0 Using CMake on Win10
Compile ceres with SuiteSparse5.x & Metis5.1.0 Using CMake on Win10
Compile ceres with SuiteSparse5.x & Metis5.1.0 Using CMake on Win10
静候编译完成,运行一个example测试。