我正尝试构建treeseg,它需要使用PCL。
我已成功从源代码编译了PCL(耶!),但是当我尝试构建treeseg时,编译器找不到PCL已经使用的任何软件包,例如flann。
这是CMakeLists.txt
文件(我已编辑以便其找到PCL):
cmake_minimum_required(VERSION 3.10)
project(treeseg)
set(PCL_DIR "/home/users/pwilkes/opt/pcl-pcl-1.10.0/build") # my edit
find_package(PCL 1.10 REQUIRED)
#find_package(Armadillo 9.8 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include/riegl)
link_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/lib/riegl)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(EXISTS "${CMAKE_SOURCE_DIR}/lib/riegl/libscanifc-mt.so")
add_executable(rxp2pcd ${CMAKE_SOURCE_DIR}/src/rxp2pcd.cpp)
target_link_libraries(rxp2pcd treeseg scanifc-mt)
endif()
else()
message(WARNING "rxp executables not building because either RIEGL libs/headers not found, or not a compatible OS.")
endif()
cmake
的截断输出> CMake Warning at /home/users/pwilkes/opt/pcl-pcl-1.10.0/build/PCLConfig.cmake:257
> (find_package):
> By not providing "FindFLANN.cmake" in CMAKE_MODULE_PATH this project has
> asked CMake to find a package configuration file provided by "FLANN", but
> CMake did not find one.
>
> Could not find a package configuration file provided by "FLANN" with any of
> the following names:
>
> FLANNConfig.cmake
> flann-config.cmake
我的问题是,为什么PCL能够找到这些依赖项,而treeseg却不能?在RHEL上尝试编译。flann等已通过conda安装。