[build] /home/paul/st/ocv/build/CMakeFiles/ocv.dir/cmake_pch.hxx:5:10: fatal error: /home/paul/st/ocv/cppCommon.hpp: No such file or directory
What is the way to define include directories for precompiled headers, if they are located in a different directory than CMakeLists.txt? I thought that include_directories will do that, and cppCommon.hpp is going to be found in /home/paul/include. It doesn’t in this case.
Header file names specified with angle brackets (e.g. <unordered_map> ) or explicit double quotes (escaped for the cmake-language(7), e.g. [["other_header.h"]] ) will be treated as is, and include directories must be available for the compiler to find them. Other header file names (e.g. project_header.h ) are interpreted as being relative to the current source directory (e.g. CMAKE_CURRENT_SOURCE_DIR) and will be included by absolute path.