[Rock-dev] override cmake packages
Matthias Goldhoorn
matthias.goldhoorn at dfki.de
Tue Jul 9 09:14:44 CEST 2013
On 08.07.2013 19:22, Sascha Arnold wrote:
>
> Hi,
> I need to override two packages in the spacebot package set normally
> provided in the rock package set.
>
> I already overrode them in the source.yml and also applied own patches.
> So far it works, but then it won't apply the flags defined in
> cmake_package in libs.autobuild witch are still defined in rock.
> And if I redefine them in the libs.autobuild of the spacebot package
> set I get the message that I have two definitions and that the one
> from rock will be used.
>
> So the question is now how can I force it to use the definition from
> spacebot? Or is there a even better way?
>
> I need that for g2o and pcl. I already found out that I can also set
> the CMake Flags in the overrides.rb, but for the pcl lib this line
> "env_add 'PKG_CONFIG_PATH', File.join(pkg.prefix, 'lib64',
> 'pkgconfig')" is also needed to find the local flann library and I
> have no clue how to add that in the overrides.rb..
>
I think overriding it inside the overrides.rb is the better way.
Take an look to the autobuild/automake api if you can cover this.
For the building step you can simply add the environment variable
globally like:
Autoproj.env_add
"PATH",File.join(Autoproj.root_dir,"install","x86_64-linux-gnu","bin")
If you need this only for one package you could also do something like this.
Autoproj.manifest.package(your_pacakge_name) do |pkg|
pkg.depends_on 'external/gcc'
pkg.using[:automake] = false
pkg.using[:autoconf] = false
pkg.using[:autogen] = false
pkg.using[:aclocal] = false
pkg.using[:libtool] = false
pkg.depends_on 'external/gcc'
def pkg.do_build
ENV['TARGET'] = "#{user_config('target')}-g++"
ENV['CXX'] = "#{user_config('target')}-g++"
ENV['CC'] = "#{user_config('target')}-gcc"
end
end
Hope this helps...
Matthias
>
> Best,
> Sascha
>
>
>
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
--
Dipl.-Inf. Matthias Goldhoorn
Space and Underwater Robotic
Universität Bremen
FB 3 - Mathematik und Informatik
AG Robotik
Robert-Hooke-Straße 5
28359 Bremen, Germany
Tel.: +49 421 178 45-4193
Zentrale: +49 421 178 45-6550
Fax: +49 421 178 45-4150
E-Mail: matthias.goldhoorn at uni-bremen.de
Weitere Informationen: http://www.informatik.uni-bremen.de/robotik
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20130709/2980941a/attachment.htm
More information about the Rock-dev
mailing list