I am doing the Step 2 of CMake tutorial (https://cmake.org/cmake/help/latest/guide/tutorial/Adding%20a%20Library.html).
After I have finished all the steps I have a problem when trying to build my code. The error is:
“CMake Error at CMakeLists.txt:43 (target_include_directories):
Cannot specify include directories for target “MathFunctions” which is not
built by this project.”
Can anyone help with this? I can provide more details because I might have done something wrong in my solution
As the error clearly states the target you want to add an include directory for does not exist. What the cause for that is, is hard to say without seeing your CMakeLists.txt