The second failure ninja: build stopped: subcommand failed. is a direct successor of the first error.
Fix the first error, and the second will disappear.
the file does exist and is in the include directory
Can you tell us the path to this directory?
According to the compiler command line, your compiler searches in the following directories:
-I/Users/jamesmartin/sourceCode/C++/qt/QTCurvesCPP2/build/Desktop_arm_darwin_generic_mach_o_64bit-Debug/QTCurvesCPP2_autogen/include -isystem /Applications/qt/6.7.2/macos/lib/QtCore.framework/Headers -iframework /Applications/qt/6.7.2/macos/lib -isystem /Applications/qt/6.7.2/macos/mkspecs/macx-clang -isystem /Applications/qt/6.7.2/macos/include -isystem /Applications/qt/6.7.2/macos/lib/QtWidgets.framework/Headers -isystem /Applications/qt/6.7.2/macos/lib/QtGui.framework/Headerswhich seems a bit strange to me as it does not have any source directory in the list.
Can you show your CMakeLists.txt?