Open rlei opened 9 years ago
This pull request adds a find_host_file macro to cmake find_file, just like find_host_package to the original find_package.
find_host_file
find_file
find_host_package
find_package
I personally experienced the issue with find_file when building https://github.com/rlei/fastd-android using android-cmake. One of its cmake files has the following
find_file(DOXYFILE_IN "Doxyfile.in" PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/" NO_DEFAULT_PATH DOC "Path to the doxygen configuration template file")
which can't find the file Doxyfile.in in the CMAKE_CURRENT_SOURCE_DIR folder. With the new macro it works fine.
Doxyfile.in
CMAKE_CURRENT_SOURCE_DIR
And thanks for your nice work on android-cmake :)
Capturing CMAKE_FIND_ROOT_PATH is not a good way to go. It's better to implement find_host_path similarly to find_host_package
CMAKE_FIND_ROOT_PATH
find_host_path
This pull request adds a
find_host_file
macro to cmakefind_file
, just likefind_host_package
to the originalfind_package
.I personally experienced the issue with
find_file
when building https://github.com/rlei/fastd-android using android-cmake. One of its cmake files has the followingwhich can't find the file
Doxyfile.in
in theCMAKE_CURRENT_SOURCE_DIR
folder. With the new macro it works fine.And thanks for your nice work on android-cmake :)