Summary:
I know that including CAFFE2_INCLUDE_DIRS in include headers are not necessary for newer cmakes. But I had this in one of my old projects and **cmake gave me error that "/usr/lib/include" is invalid path**.
It seems like "${_INSTALL_PREFIX}/lib/include" should be changed to "${_INSTALL_PREFIX}/include" as all caffe2 headers are in /include rather than /lib/include/
Please correct me if I am wrong?
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14306
Differential Revision:
D13356246
Pulled By: ezyang
fbshipit-source-id:
e2d5d3c42352e59b245714ad90fd7a9ef48170d7
# Note: the current list dir is _INSTALL_PREFIX/share/cmake/Gloo.
get_filename_component(
_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
-set(CAFFE2_INCLUDE_DIRS "${_INSTALL_PREFIX}/lib/include")
+set(CAFFE2_INCLUDE_DIRS "${_INSTALL_PREFIX}/include")