http://bugs.orocos.org/show_bug.cgi?id=856
Summary: Include path in pkgconfig file generated by
orocos_generate_package in ROS environments is not
usefull
Product: Toolchain
Version: 2.3.0
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
Created attachment 678
--> http://bugs.orocos.org/attachment.cgi?id=678
patch for bug
Hi,
I was updating some of my packages to use the orocos_generate_package macro to
(automatically) export compile and link flags instead of putting them in the
manifest.xml. But I noticed that the include dir by default points to
${package_path}/include/orocos in ROS environments. This is not really usefull
since the headers you listed with orocos_install_headers only end up there
after a make install which is not happening in a ROS environment. Therefor I
added a patch that will set the includedir to ${package_path}/.. which is more
usefull in most cases.
-- Ruben
[Bug 856] Include path in pkgconfig file generated by orocos_gen
http://bugs.orocos.org/show_bug.cgi?id=856
Peter Soetens <peter [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Peter Soetens <peter [..] ...> 2011-04-21 22:02:09 CEST ---
(In reply to comment #1)
> (In reply to comment #0)
> > Created attachment 678 [details] [details]
> > patch for bug
> >
> > Hi,
> >
> > I was updating some of my packages to use the orocos_generate_package macro to
> > (automatically) export compile and link flags instead of putting them in the
> > manifest.xml. But I noticed that the include dir by default points to
> > ${package_path}/include/orocos in ROS environments. This is not really usefull
> > since the headers you listed with orocos_install_headers only end up there
> > after a make install which is not happening in a ROS environment. Therefor I
> > added a patch that will set the includedir to ${package_path}/.. which is more
> > usefull in most cases.
>
> I understand the bug, but the solution looks only half-way. Headers may be:
>
> top-level:
> packagename/header.h
> package in include dir:
> packagename/include/packagename/header.h
> package in orocos include dir:
> packagename/include/orocos/packagename/header.h
>
> I think the last case is rare in the ROS case, since
> prefix/include/orocos/packagename is the location of installed headers for a
> package.
>
> So you want to support:
> #include <packagename/header.h>
>
> you'll have to let the user specify where the headers are (orocos_headers
> macro), AND/OR add these paths as 'default'.
>
> I would vote for extending your patch at least to include the two first path
> cases, and preferably, allow to override that.
I pushed a patch that does this, except that we don't allow to override, but
advise not to use orocos_generate_package() in case your package layout does
not match what the .pc file expects, and to write the .pc file yourself.
Peter
[Bug 856] Include path in pkgconfig file generated by orocos_gen
http://bugs.orocos.org/show_bug.cgi?id=856
Peter Soetens <peter [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |peter [..] ...
--- Comment #1 from Peter Soetens <peter [..] ...> 2011-04-20 14:29:54 CEST ---
(In reply to comment #0)
> Created attachment 678 [details]
> patch for bug
>
> Hi,
>
> I was updating some of my packages to use the orocos_generate_package macro to
> (automatically) export compile and link flags instead of putting them in the
> manifest.xml. But I noticed that the include dir by default points to
> ${package_path}/include/orocos in ROS environments. This is not really usefull
> since the headers you listed with orocos_install_headers only end up there
> after a make install which is not happening in a ROS environment. Therefor I
> added a patch that will set the includedir to ${package_path}/.. which is more
> usefull in most cases.
I understand the bug, but the solution looks only half-way. Headers may be:
top-level:
packagename/header.h
package in include dir:
packagename/include/packagename/header.h
package in orocos include dir:
packagename/include/orocos/packagename/header.h
I think the last case is rare in the ROS case, since
prefix/include/orocos/packagename is the location of installed headers for a
package.
So you want to support:
#include <packagename/header.h>
you'll have to let the user specify where the headers are (orocos_headers
macro), AND/OR add these paths as 'default'.
I would vote for extending your patch at least to include the two first path
cases, and preferably, allow to override that.
Peter