There's a simple project comprised of only main.cpp which uses ceres library (3rd party lib).
main.cpp:
#include <ceres/ceres.h>
int main() {
ceres::some_function();
return 0;
}
Previously, this is how I used to code as a very beginner:
download ceres-related source files -> build with cmake -> compile & install using Visual Studio -> generates ceres.lib which I will be using.
open up visual studio -> make an empty new project
link ceres-related .lib and .h files in the project setting
create main.cpp file and start coding:
#include <ceres/ceres.h> ...
build & run inside Visual Studio
Now, I need to make this project (main.cpp) be built with CMake.
Do I need to configure CMakeList.txt for main.cpp such that ceres.lib is also built during the build of main.cpp?
Additionally, can you point me to a CMake tutorial that covers this kind of situation - configuring a project that uses a third-party library which needs to be built as well.