Dear Sirs,
I have a fresh install of toolchain-2.3.0 on ubuntu 10.10 with xenomai patch.
I created my modules using the command
orogen --target=xenomai -v mymodule.orogen
I need to use rtt-marshalling library so I modified the orogen generated CMakeLists.txt as follows:
1) CMakeLists.txt in the root project
PROJECT(rosetta)
cmake_minimum_required(VERSION 2.6)
SET (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/.orogen/config")
INCLUDE(rosettaBase)
find_package(RTTPlugin REQUIRED rtt-marshalling)
find_package(RTTPlugin COMPONENTS rtt-marshalling)
target_link_libraries(Rosetta ${RTT_PLUGIN_rtt-marshalling_LIBRARIES})
# FIND_PACKAGE(KDL)
# FIND_PACKAGE(OCL)
2) CMakeLists.txt in tasks directory
# Generated from orogen/lib/orogen/templates/tasks/CMakeLists.txt
include(rosettaTaskLib)
find_package(RTTPlugin REQUIRED rtt-marshalling)
ADD_LIBRARY(${ROSETTA_TASKLIB_NAME} SHARED
${ROSETTA_TASKLIB_SOURCES})
add_dependencies(${ROSETTA_TASKLIB_NAME}
regen-typekit)
TARGET_LINK_LIBRARIES(${ROSETTA_TASKLIB_NAME}
${OrocosRTT_LIBRARIES}
${ROSETTA_TASKLIB_DEPENDENT_LIBRARIES} ${RTT_PLUGIN_rtt-marshalling_LIBRARIES})
SET_TARGET_PROPERTIES(${ROSETTA_TASKLIB_NAME}
PROPERTIES LINK_INTERFACE_LIBRARIES "${ROSETTA_TASKLIB_INTERFACE_LIBRARIES}")
INSTALL(TARGETS ${ROSETTA_TASKLIB_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/orocos)
INSTALL(FILES ${ROSETTA_TASKLIB_HEADERS}
DESTINATION include/orocos/rosetta)
Running, from the build directory, the command cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/orocosComponents
I get the following output
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/orocosComponents
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test CXX_SUPPORTS_WALL
-- Performing Test CXX_SUPPORTS_WALL - Success
-- Found Doxygen: /usr/bin/doxygen
-- documentation can be built
-- checking for module 'orocos-rtt-xenomai>=2.1.0'
-- found orocos-rtt-xenomai, version 2.3.0
-- checking for module 'typelib'
-- found typelib, version 1.1
-- checking for module 'orocos-rtt-corba-xenomai>=2.1.0'
-- found orocos-rtt-corba-xenomai, version 2.3.0
-- Orocos reports in /usr/src/orocos/install/include/rtt/transports/corba/rtt-corba-config.h to use the OMNIORB
-- checking for module 'orocos-ocl-xenomai>=2.1.0'
-- found orocos-ocl-xenomai, version 2.3.0
-- OCL found, the generated task library will be compatible with the deployer component
-- Optional library RTT_PLUGIN_rtt-marshalling NOT FOUND. If the library is already installed, use the RTT_PLUGIN_rtt-marshalling_ROOT_DIR environment variable or ccmake to set the missing variables manually.
-- Found RTT_PLUGIN_rtt-typekit
-- Found RTT_PLUGIN_rtt-transport-corba
-- Optional library RTT_PLUGIN_rtt-marshalling NOT FOUND. If the library is already installed, use the RTT_PLUGIN_rtt-marshalling_ROOT_DIR environment variable or ccmake to set the missing variables manually.
-- Optional library RTT_PLUGIN_rtt-marshalling NOT FOUND. If the library is already installed, use the RTT_PLUGIN_rtt-marshalling_ROOT_DIR environment variable or ccmake to set the missing variables manually.
-- Configuring done
-- Generating done
-- Build files have been written to: /root/rock/Rosetta10/build
I checked that librtt-marshalling-xenomai.so library
is stored in /usr/src/orocos/install/lib/orocos/xenomai/plugins/
I tried even the command
cmake .. -DRTT_PLUGIN_rtt-marshalling_ROOT_DIR=/usr/src/orocos/install/lib/orocos/xenomai/plugins/librtt-marshalling-xenomai.so
but I got the same error.
To solve the problem I had to modify the CMAKE_MODULE_PATH int CMakeLists.txt in the root project, as shownn below.
PROJECT(rosetta)
cmake_minimum_required(VERSION 2.6)
SET (CMAKE_MODULE_PATH "/usr/src/orocos/ocl/config/" "${CMAKE_SOURCE_DIR}/.orogen/config"})
INCLUDE(rosettaBase)
find_package(RTTPlugin REQUIRED rtt-marshalling)
target_link_libraries(Rosetta ${RTT_PLUGIN_rtt-marshalling_LIBRARIES})
# FIND_PACKAGE(KDL)
# FIND_PACKAGE(OCL)
Is this the desired behaviour of orogen generated CMakeLists.txt ?
Thank you in advance
G. Rizzi