我遇到以下CmakeList.txt
文件的问题。
/home/hani/entitylinking
/entitylinking/3rdparty/include/entlk
/home/hani/ENTLK_DIST
我添加了以下answer中建议的message(STATUS "_file:" ${_file} )
来检查文件的位置。我不知道错误是什么。
我实际上也在服务器上工作。不在我的机器上
file(GLOB_RECURSE _files RELATIVE ${Entlk_SOURCE_DIR}/3rdparty/include/ *.h)
# TODO if needed, let append a list of *.hpp files. A solution may be to replace by
# file(GLOB_RECURSE _files RELATIVE ${Entlk_SOURCE_DIR}/3rdparty/include/ *.h??)
foreach (_file ${_files})
# get the real file instead of the symbolic link
message(STATUS "_file:" ${_file} )
get_filename_component(_resolvedFile "${_file}" REALPATH)
# get the relative path to install
get_filename_component(dir "${_file}" DIRECTORY)
message(STATUS "_resolvedFile:" ${_resolvedFile} )
install(FILES ${_resolvedFile} DESTINATION include/${dir})
endforeach()
我收到的消息如下
-- _resolvedFile:/home/hani/entitylinking/3rdparty/sqlite3/sqlite_modern_cpp/utility/function_traits.h
-- _file:entlk/3rdparty/simstring/memory_mapped_file.h
CMake Error at 3rdparty/include/CMakeLists.txt:12 (get_filename_component):
get_filename_component unknown component DIRECTORY
-- _resolvedFile:/home/hani/entitylinking/3rdparty/include/entlk/3rdparty/simstring/memory_mapped_file.h
-- _file:entlk/3rdparty/simstring/measure.h
CMake Error at 3rdparty/include/CMakeLists.txt:12 (get_filename_component):
get_filename_component unknown component DIRECTORY