CMakeLists.txt上的CMake警告(add_executable)

时间:2016-08-08 07:28:25

标签: cmake point-cloud-library

我将点云库用于我自己的项目和 通过下面描述的CMakeLists.txt将pcl链接到我的项目:

project(ScanMatching)
cmake_minimum_required(VERSION 2.8)

find_package(PCL 1.8 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable(modeling main.cpp custom.hpp)
target_link_libraries(modeling ${PCL_LIBRARIES})

它曾经运作良好,但在我错误输入之后 sudo apt-get autoremove (不适合autoremove)

我得到以下CMakeErrors(CMake结果片段):

CMake Warning at CMakeLists.txt:11 (add_executable):
  Cannot generate a safe linker search path for target modeling because files
  in some directories may conflict with libraries in implicit directories:

link library [libpcl_common.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_kdtree.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_octree.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_search.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_sample_consensus.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_filters.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_io.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_features.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_keypoints.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_segmentation.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_visualization.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_surface.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_registration.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_tracking.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_recognition.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_outofcore.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
link library [libpcl_people.so] in /usr/lib may be hidden by files in:
  /usr/local/lib

  Some of these libraries may not be found correctly.


CMake Warning at CMakeLists.txt:11 (add_executable):
  Cannot generate a safe runtime search path for target modeling because
  files in some directories may conflict with libraries in implicit
  directories:
runtime library [libpcl_common.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_kdtree.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_octree.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_search.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_sample_consensus.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_filters.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_io.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_features.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_keypoints.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_segmentation.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_visualization.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_surface.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_registration.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_tracking.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_recognition.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_outofcore.so] in /usr/lib may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_people.so] in /usr/lib may be hidden by files in:
  /usr/local/lib

  Some of these libraries may not be found correctly.


-- Generating done
-- Build files have been written to: /home/acenewgate/Dropbox/Workspace/JungKi Project/DescriptorMatching/build-DescriptorMatching-Desktop-Default

如何修改我的CMakeLists.txt以避免这种情况?

0 个答案:

没有答案