[Vm-dev] Passing additional parameters for a particular plugin

Igor Stasenko siguctua at gmail.com
Wed May 16 23:11:21 UTC 2012

On 16 May 2012 16:53, Damien Cassou <damien.cassou at gmail.com> wrote:
> Hi,
> I try to build DBusPlugin (www.squeaksource.com/dbus). Unfortunately,
> compiling the generated C file requires passing "$(pkg-config dbus-1
> --cflags)" as additional compiler argument. How can I specify that?
Hi, Damien.
If you using CMakeVMMaker,
you can do it by implementing

method in a CPlatformConfig (if this option is platform neutral) or in
appropriate subclass
for target platform.

For example see the implementation of

maker addDefinitions: '..somedefs...'.

is what you need.

But I am not sure what
$(pkg-config dbus-1 --cflags)
 expression means.
Looks like stuff between () is invoked by shell and output of it is
used instead.

Of course you can force cmake to invoke any command you like.. i just
don't remember how
exactly.. And there is multiple ways.

See #configureFT2Plugin: , which invokes an external script. And see a
generated file
(it should be in build/FT2Plugin/CMakeLists.txt)

But i don't like that it takes flags from another package build flags (dbus).
This means that such plugin will work only on your machine and nobody
else(s), once your build
flags is different to others.
On your place, i would take this command output and put it literally
into extra definitions.
Like that, a plugin configuration will be not dependent from some
3rd-party stuff , and won't change randomly depending on system where
it built.

> Thanks
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
> "Lambdas are relegated to relative obscurity until Java makes them
> popular by not having them." James Iry

Best regards,
Igor Stasenko.

More information about the Vm-dev mailing list