So I recently started a project that I'm developing in Linux. So I want to use CMake to build this project but I'm not sure on how CMake really works. I have looked at a few examples and tried using them but I have trouble wrapping my head around all of this.
My directory structure looks like this
ProjectDir src -file.cpp -file.h dir1 -otherfile.cpp test -main.cpp build //build stuff goes here
Where I want the file in the src directory to be built as a library.
The test directory to be built as an executable linking to the library from src
Anyone have any guidelines on what my CMakeLists.txt should look like?