CMakeLists.txt calls CMakeLists.txt -> ROS FAIL [closed]
Hello, i want include ROS into an lager project, so there calls a single CMakeLists.txt n CMakeLists.txt's. Structure: workspace/source/Apps/fieldviewer/CMakeLists.txt (with rosbuild_init()) workspace/source/Apps/fieldviewer/manifest.xml workspace/source/Apps/... worksapce/source/CmakeLists.txt workspace/build/
if i call: $ cmake ../source/Apps/fieldviewer everything is fine, but if i call: $ cmake ../source there is an error: [rosbuild] Building package source CMake Error at /opt/ros/electric/ros/core/rosbuild/private.cmake:110 (message): [rosbuild] rospack found package "source" at "", but the current directory is "/home/---/workspace/source/Apps/fieldviewer". You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order. Call Stack (most recent call first): /opt/ros/electric/ros/core/rosbuild/public.cmake:180 (_rosbuild_check_package_location) Apps/fieldviewer/CMakeLists.txt:17 (rosbuild_init)
Is there anything to configure in worksapce/source/CmakeLists.txt file?
Path config: #!/bin/sh source /opt/ros/electric/setup.bash export ROS_ROOT=/opt/ros/electric/ros export PATH=$ROS_ROOT/bin:$PATH export PYTHONPATH=$ROS_ROOT/core/roslib/src:$PYTHONPATH export ROS_PACKAGE_PATH=~/workspace/source:/opt/ros/electric/stacks:$ROS_PACKAGE_PATH
thanks!
so the error is ${PROJECT_SOURCE_DIR} != ${${PROJECT_NAME} _PACKAGE_PATH}, but why ... i set before rosbuild_init() the PROJECT_NAME var. with project(fieldviewer). If i set ${${PROJECT_NAME} _PACKAGE_PATH} manuel(before rosbuild_init), the same error happens.
Please be a lot clearer about what you're trying to do and exactly how you're doing it. Otherwise there's no way for us to reproduce, and as your doing something very different than standard it's not something many of us have experience with.