For example, in an actual project, I used the CMake File API to retrieve the include path of a target as “C:/Users/Jason/OneDrive/Desktop/CMakeTest/opencv-4.7.0/build/3rdparty/libtiff”. The project folder is “opencv-4.7.0”, and the files linked by this target are located in the project’s “build” folder. This path is generated based on my CMake configuration and does not exist in the original source code of the project.
I want the include path that is independent of the configuration. It should be located in a folder outside the “build” folder within the project. Is there a way to obtain it? Thank you!
A similar situation exists for the command fragments in the link section, where the linked library is “-Wl,-rpath,C:/Users/iever/OneDrive/Desktop/CMakeTest/opencv-4.7.0/build/lib”.