ROS: melodic
Linux: 18.04
When i catkin_make
when module_one
find package module_two
and module_two
find package module_one
, there is error like below
-- +++ processing catkin package: 'module_one' -- ==> add_subdirectory(module_one) -- Could NOT find module_two (missing: module_two_DIR) -- Could not find the required component 'module_two'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "module_two" with any of the following names:
module_twoConfig.cmake module_two-config.cmake
Add the installation prefix of "module_two" to CMAKE_PREFIX_PATH or set "module_two_DIR" to a directory containing one of the above files. If "module_two" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first):
module_one/CMakeLists.txt:10 (find_package)-- Configuring incomplete, errors occurred! See also "/home/ri/workspace/catkin_playground/build/CMakeFiles/CMakeOutput.log". See also "/home/ri/workspace/catkin_playground/build/CMakeFiles/CMakeError.log".
the workspace folder tree is below
├── build
│ ├── atomic_configure
│ ├── catkin
│ │ └── catkin_generated
│ │ └── version
│ ├── catkin_generated
│ │ ├── installspace
│ │ └── stamps
│ │ └── Project
│ ├── CMakeFiles
│ │ ├── 3.11.0
│ │ │ ├── CompilerIdC
│ │ │ │ └── tmp
│ │ │ └── CompilerIdCXX
│ │ │ └── tmp
│ │ └── CMakeTmp
│ ├── gtest
│ │ ├── CMakeFiles
│ │ └── googlemock
│ │ ├── CMakeFiles
│ │ └── gtest
│ │ └── CMakeFiles
│ ├── module_one
│ │ └── CMakeFiles
│ └── test_results
├── devel
│ └── lib
└── src
├── module_one
└── module_two
module_one and module_two are pacakage individually.
module_one's CMakeLists.txt has
find_package(catkin REQUIRED module_two)
module_two's CMakeLists.txt has
find_package(catkin REQUIRED module_one)
like the above project,
Is there a CMakeLists configuration for referencing packages to each other?
Originally posted by Kyuhwan Yeon on ROS Answers with karma: 23 on 2021-06-27
Post score: 0