Skip to content

Commit 358e782

Browse files
committedSep 28, 2012
Merge remote-tracking branch 'orocos/master'
Conflicts: Rakefile lib/orogen/gen/typekit.rb lib/orogen/templates/typekit/mqueue/CMakeLists.txt lib/orogen/templates/typekit/typelib/CMakeLists.txt manifest.xml
2 parents d993069 + f803411 commit 358e782

13 files changed

+58
-28
lines changed
 

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ifdef ROS_ROOT
22
export MALLOC_CHECK_=0
33
default: install
4-
include $(shell rosstack find orocos_toolchain_ros)/env.mk
4+
include $(shell rospack find rtt)/../env.mk
55
install:
66
rake setup[-DOROCOS_TARGET=$(OROCOS_TARGET)]
77
else

‎Manifest.txt

-9
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,6 @@ lib/orogen/templates/typekit/typelib/Type.cpp
9797
lib/orogen/templates/typekit/typelib/transport-typelib.pc
9898
lib/orogen/test.rb
9999
lib/orogen/version.rb
100-
rtt-typelib/CMakeLists.txt
101-
rtt-typelib/MQTypelibMarshaller.cpp
102-
rtt-typelib/MQTypelibMarshaller.hpp
103-
rtt-typelib/OpaqueTypelibMarshaller.hpp
104-
rtt-typelib/TypelibMarshaller.hpp
105-
rtt-typelib/TypelibMarshallerBase.cpp
106-
rtt-typelib/TypelibMarshallerBase.hpp
107-
rtt-typelib/TypelibMarshallerHandle.hpp
108-
rtt-typelib/rtt-typelib.pc.in
109100
test/data/build_regen_library/include/regen_lib.h
110101
test/data/empty_component.orogen
111102
test/data/exists

‎Rakefile

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ task :setup do
1717
exit(1)
1818
end
1919
end
20+
2021
task :default => :setup
2122

2223
begin

‎lib/orogen/templates/config/FindRTTPlugin.cmake

+42-8
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,76 @@
1111
# This script creates the following variables:
1212
# RTT_PLUGIN_<COMPONENT>_FOUND: Boolean that indicates if the plugin was found
1313
# RTT_PLUGIN_<COMPONENT>_INCLUDE_DIRS: Path to the plugin header files (equal to OROCOS_RTT_INCLUDE_DIRS)
14-
# RTT_PLUGIN_<COMPONENT>_LIBRARIES: Plugin library
14+
# RTT_PLUGIN_<COMPONENT>_LIBRARIES: Plugin library for the current OROCOS_TARGET cmake or environment variable.
15+
# RTT_PLUGIN_<COMPONENT>_<OROCOS_TARGET>_LIBRARIES: Plugin library for the current OROCOS_TARGET cmake or environment variable (same as above).
1516
#
1617
################################################################################
1718

1819
include(LibFindMacros)
1920

20-
find_package(Orocos-RTT REQUIRED ${RTT_HINTS})
21+
find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
2122

2223
FOREACH(COMPONENT ${RTTPlugin_FIND_COMPONENTS})
2324
# We search for both 'given name' and 'given name + -target'
2425
set(PLUGIN_NAME ${COMPONENT} ${COMPONENT}-${OROCOS_TARGET} )
2526
#STRING(TOUPPER ${COMPONENT} COMPONENT)
2627

2728
set(RTT_PLUGIN_${COMPONENT}_INCLUDE_DIR ${OROCOS-RTT_INCLUDE_DIRS} )
29+
set(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_INCLUDE_DIR ${OROCOS-RTT_INCLUDE_DIRS} )
2830
# Find plugins
2931
if(OROCOS-RTT_PLUGIN_PATH)
3032
# Use location specified by environment variable
3133
find_library(RTT_PLUGIN_${COMPONENT}_LIBRARY NAMES ${PLUGIN_NAME} PATHS ${OROCOS-RTT_PLUGIN_PATH} PATH_SUFFIXES ${OROCOS_TARGET} NO_DEFAULT_PATH)
3234
find_library(RTT_PLUGIN_${COMPONENT}D_LIBRARY NAMES ${PLUGIN_NAME}${CMAKE_DEBUG_POSTFIX} PATHS ${OROCOS-RTT_PLUGIN_PATH} PATH_SUFFIXES ${OROCOS_TARGET} NO_DEFAULT_PATH)
35+
find_library(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARY NAMES ${PLUGIN_NAME} PATHS ${OROCOS-RTT_PLUGIN_PATH} PATH_SUFFIXES ${OROCOS_TARGET} NO_DEFAULT_PATH)
36+
find_library(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}D_LIBRARY NAMES ${PLUGIN_NAME}${CMAKE_DEBUG_POSTFIX} PATHS ${OROCOS-RTT_PLUGIN_PATH} PATH_SUFFIXES ${OROCOS_TARGET} NO_DEFAULT_PATH)
3337
else()
3438
# Use default CMake search process
3539
find_library(RTT_PLUGIN_${COMPONENT}_LIBRARY NAMES ${PLUGIN_NAME} PATHS ${OROCOS-RTT_PLUGIN_PATH} PATH_SUFFIXES ${OROCOS_TARGET})
3640
find_library(RTT_PLUGIN_${COMPONENT}D_LIBRARY NAMES ${PLUGIN_NAME}${CMAKE_DEBUG_POSTFIX} PATHS ${OROCOS-RTT_PLUGIN_PATH} PATH_SUFFIXES ${OROCOS_TARGET})
41+
find_library(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARY NAMES ${PLUGIN_NAME} PATHS ${OROCOS-RTT_PLUGIN_PATH} PATH_SUFFIXES ${OROCOS_TARGET})
42+
find_library(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}D_LIBRARY NAMES ${PLUGIN_NAME}${CMAKE_DEBUG_POSTFIX} PATHS ${OROCOS-RTT_PLUGIN_PATH} PATH_SUFFIXES ${OROCOS_TARGET})
3743
endif()
3844

3945
# Set the include dir variables and the libraries and let libfind_process do the rest.
4046
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
4147
set(RTT_PLUGIN_${COMPONENT}_PROCESS_INCLUDES RTT_PLUGIN_${COMPONENT}_INCLUDE_DIR )
42-
if ( RTT_PLUGIN_${COMPONENT}D_LIBRARY )
43-
list(APPEND RTT_PLUGIN_${COMPONENT}_PROCESS_LIBS RTT_PLUGIN_${COMPONENT}D_LIBRARY)
48+
if ( RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}D_LIBRARY )
49+
list(APPEND RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_PROCESS_LIBS RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}D_LIBRARY)
4450
endif()
45-
if ( RTT_PLUGIN_${COMPONENT}_LIBRARY )
46-
list(APPEND RTT_PLUGIN_${COMPONENT}_PROCESS_LIBS RTT_PLUGIN_${COMPONENT}_LIBRARY)
51+
if ( RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARY )
52+
list(APPEND RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_PROCESS_LIBS RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARY)
4753
endif()
4854

49-
libfind_process( RTT_PLUGIN_${COMPONENT} )
55+
# Forward FIND_REQUIRED
56+
if(RTTPlugin_FIND_REQUIRED)
57+
set(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_FIND_REQUIRED TRUE)
58+
endif()
59+
60+
# Forward FIND_QUIET
61+
if(RTTPlugin_FIND_QUIET)
62+
set(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_FIND_QUIET TRUE)
63+
endif()
5064

51-
ENDFOREACH(COMPONENT)
65+
libfind_process( RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET} )
5266

67+
# Since libfind_process does not deal correctly with "optimized" and "debug" keywords,
68+
# we have to manualy add them thereafter
69+
if(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARY AND RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}D_LIBRARY)
70+
set(RTT_PLUGIN_${COMPONENT}_LIBRARIES
71+
debug ${RTT_PLUGIN_${COMPONENT}D_LIBRARY}
72+
optimized ${RTT_PLUGIN_${COMPONENT}_LIBRARY})
73+
set(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARIES
74+
debug ${RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}D_LIBRARY}
75+
optimized ${RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARY})
76+
else()
77+
set(RTT_PLUGIN_${COMPONENT}_LIBRARIES "")
78+
set(RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARIES "")
79+
endif()
80+
81+
if ( NOT "RTT_PLUGIN_${COMPONENT}_LIBRARIES" STREQUAL "RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARIES" )
82+
# Avoid worst case and disable the generic case:
83+
message("[FindRTTPlugin] Forcing RTT_PLUGIN_${COMPONENT}_LIBRARIES to ${OROCOS_TARGET} since your are switching OROCOS_TARGETs")
84+
set( RTT_PLUGIN_${COMPONENT}_LIBRARIES ${RTT_PLUGIN_${COMPONENT}_${OROCOS_TARGET}_LIBRARIES})
85+
endif()
86+
ENDFOREACH(COMPONENT)

‎lib/orogen/templates/typekit/Plugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ bool orogen_typekits::<%= typekit.name %>TypekitPlugin::loadTypes()
2727
{
2828
RTT::types::TypeInfoRepository::shared_ptr ti_repository = RTT::types::TypeInfoRepository::Instance();
2929

30-
RTT::types::TypeInfo* ti = 0;
30+
RTT::types::TypeInfoGenerator* ti = 0;
3131
<% registered_types.each do |type| %>
3232
<% if type < Typelib::ArrayType %>
3333
ti = <%= type.deference.method_name(true) %>_ArrayTypeInfo();

‎lib/orogen/templates/typekit/manifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
<review status="unreviewed" notes=""/>
1010
<url>http://ros.org/wiki/<%=typekit.name %>-typekit</url>
1111
<depend package="rtt"/>
12+
<depend package="rtt_typelib"/>
1213

1314
</package>

‎lib/orogen/templates/typekit/mqueue/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Generated from orogen/lib/orogen/templates/typekit/mqueue/CMakeLists.txt
22

33
# OrocosRTT_PREFIX has been set by the pkg-config find modules:
4-
find_package(Orocos-RTT REQUIRED rtt-transport-mqueue HINTS ${OrocosRTT_PREFIX}/lib/cmake/orocos-rtt)
4+
find_package(OROCOS-RTT REQUIRED rtt-transport-mqueue HINTS ${OrocosRTT_PREFIX}/lib/cmake/orocos-rtt)
55

6-
<% typekit_deps = typekit.plugin('corba').dependencies(typekit); %>
6+
<% typekit_deps = typekit.plugin('mqueue').dependencies(typekit); %>
77
<%= Generation.cmake_pkgconfig_require(typekit_deps, 'mqueue') %>
88

9-
orogen_pkg_check_modules(RTT_Typelib REQUIRED rtt-typelib)
9+
orogen_pkg_check_modules(RTT_Typelib REQUIRED rtt_typelib-${OROCOS_TARGET})
1010
include_directories(${RTT_Typelib_INCLUDE_DIRS})
1111
link_directories(${RTT_Typelib_LIBRARY_DIRS})
1212

‎lib/orogen/templates/typekit/type_info/ArrayInfo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace orogen_typekits {
2121
: <%= base_class %>("<%= type.deference.full_name %>[]") {}
2222
};
2323

24-
RTT::types::TypeInfo* <%= type.deference.method_name(true) %>_ArrayTypeInfo()
24+
RTT::types::TypeInfoGenerator* <%= type.deference.method_name(true) %>_ArrayTypeInfo()
2525
{ return new <%= type.deference.method_name(true) %>ArrayTypeInfo(); }
2626
}
2727

‎lib/orogen/templates/typekit/type_info/Info.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace orogen_typekits {
2525
: <%= base_class %>("<%= type.full_name %>") {}
2626
};
2727

28-
RTT::types::TypeInfo* <%= type.method_name(true) %>_TypeInfo()
28+
RTT::types::TypeInfoGenerator* <%= type.method_name(true) %>_TypeInfo()
2929
{ return new <%= type.method_name(true) %>TypeInfo(); }
3030
}
3131

‎lib/orogen/templates/typekit/type_info/OpaqueInfo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ namespace orogen_typekits {
9191
<% end %>
9292
};
9393

94-
RTT::types::TypeInfo* <%= type.method_name(true) %>_TypeInfo()
94+
RTT::types::TypeInfoGenerator* <%= type.method_name(true) %>_TypeInfo()
9595
{ return new <%= type.method_name(true) %>TypeInfo(); }
9696
}
9797

‎lib/orogen/templates/typekit/type_info/TypeInfo.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ namespace orogen_typekits {
77
<% typesets.registered_types.each do |type| %>
88
<% if type < Typelib::ArrayType %>
99
/** Creates and returns a TypeInfo object for <%= type.cxx_name %> */
10-
RTT::types::TypeInfo* <%= type.deference.method_name(true) %>_ArrayTypeInfo();
10+
RTT::types::TypeInfoGenerator* <%= type.deference.method_name(true) %>_ArrayTypeInfo();
1111
<% else %>
1212
/** Creates and returns a TypeInfo object for <%= type.cxx_name %> */
13-
RTT::types::TypeInfo* <%= type.method_name(true) %>_TypeInfo();
13+
RTT::types::TypeInfoGenerator* <%= type.method_name(true) %>_TypeInfo();
1414
<% end %>
1515
<% end %>
1616
}

‎lib/orogen/templates/typekit/typelib/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ orogen_pkg_check_modules(TYPELIB REQUIRED typelib)
1111
include_directories(${TYPELIB_INCLUDE_DIRS})
1212
link_directories(${TYPELIB_LIBRARY_DIRS})
1313

14-
orogen_pkg_check_modules(RTT_Typelib REQUIRED rtt-typelib)
14+
orogen_pkg_check_modules(RTT_Typelib REQUIRED rtt_typelib-${OROCOS_TARGET})
1515
include_directories(${RTT_Typelib_INCLUDE_DIRS})
1616
link_directories(${RTT_Typelib_LIBRARY_DIRS})
1717

‎manifest.xml

+3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
<depend package="typelib" />
1717
<depend package="tools/service_discovery" optional="1" />
1818
<depend package="rtt_typelib" />
19+
<rosdep name="libxslt" />
1920
<rosdep name="nokogiri" />
21+
<rosdep name="rake" />
22+
<rosdep name="ruby" />
2023
<!--
2124
<rosdep name="webgen" type="doc" />
2225
<rosdep name="coderay" type="doc" />

0 commit comments

Comments
 (0)
Please sign in to comment.