I tried adding this suggestion into the generated makefile (which has a warning - do not edit), but when I run command-line “make” I get an error about “missing separator” for the added line.
Is something wrong with the syntax, or is “include_directories” not recognized as a valid command by “make”?
Thanks for your support. What you say is what I thought. A generated makefile should not be modified.
But, when the Generator does not create commands in makefile to “include_directories” that are required for correct compilation, then perhaps the Generator needs to be instructed to process the “include_directories” command and explicitly put the correct directory paths into the generated makefile.
Do you know how to get CMake Generator to put those “include_directories” into the resulting makefile. If you don’t know, then were can I go to get the solution.
CMake’s include_directories() command does that (as does target_include_directories which is the preferred one). However, the value must be known when CMake runs; you cannot defer expansion of the variable until build time.
Perhaps I was not clear about the problem. CMake include_directories works fine wiht CMake.
BUT, I need to have “make makefile” work running “make” not running “cmake”.
The Generator is supposed to create a Unix Makefile, but the created makefile has lost the directories. It looks like they were not included in the Generation process.
The objective is to have “make makefile” run on a different target machine which only supports “make” but does not support “cmake”
So, how can I get the Generator to process the “include_directories” correctly and put something in the generated “makefile” ?