CMakeLists.txt与package.xml依赖项比较

这个是package.xml的依赖项

 Apache-2.0

  ament_cmake

  curl

  python3-yaml

 

  asio

  tinyxml2

 

  clang-tidy

  flex

  bison

  libncurses-dev

  usbutils

  python3-vcstool

  ament_lint_auto

  ament_lint_common

 

这个是Cmakelists.txt的依赖项

# find dependencies
find_package(ament_cmake REQUIRED)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package( REQUIRED)

if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  # the following line skips the linter which checks for copyrights
  # uncomment the line when a copyright and license is not present in all source files
  #set(ament_cmake_copyright_FOUND TRUE)
  # the following line skips cpplint (only works in a git repo)
  # uncomment the line when this package is not in a git repo
  #set(ament_cmake_cpplint_FOUND TRUE)
  ament_lint_auto_find_test_dependencies()
endif()
可以看出来package.xml的依赖项远远多于cmakelists.txt依赖项,并不是一样的。

解释:cmakelists.txt只负责编译有关的依赖,其他无关不用管,package.xml包含了所有的依赖项,所以cmakelist依赖包含于package.xml依赖

你可能感兴趣的:(xml)