I would like to add general include_directories to a toolchain.cmake file.
However, as soon I specify those include directories, CMake complains about missing CMakeLists.txt in that directory. I did not specify add_library nor add_executable for a subdirectory of include_directories so I don’t understand really why CMake complains. There is nothing to do except adding those include_directories to the list of -I switches.
-- Configuring done (1.6s)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FMT_SYSTEM_INCLUDE_PATH
used as include directory in directory /Users/clausklein/cmake/test
used as include directory in directory /Users/clausklein/cmake/test
used as include directory in directory /Users/clausklein/cmake/test
used as include directory in directory /Users/clausklein/cmake/test
CMake Error in CMakeLists.txt:
Found relative path while evaluating include directories of "qt_test":
"FMT_SYSTEM_INCLUDE_PATH-NOTFOUND"
CMake Error in CMakeLists.txt:
Found relative path while evaluating include directories of "qt_test":
"FMT_SYSTEM_INCLUDE_PATH-NOTFOUND"
-- Generating done (0.0s)
CMake Generate step failed. Build files cannot be regenerated correctly.
bash-5.3$
$ cmake -B debug -S . --toolchain ../toolchain.cmake CMake Error: The source directory “/home/user/.../mylib” does not appear to contain CMakeLists.txt.