Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: john <john.osullivan@cloudiumsystems.com>
To: buildroot@busybox.net
Subject: [Buildroot] Environment Variables and CMAKE
Date: Mon, 27 May 2013 10:49:33 +0100	[thread overview]
Message-ID: <1369648173.2814.53.camel@john-ubu> (raw)
In-Reply-To: <CAHXCMMLF5OcqGrYpxuAH=-9+By7CfLTCzc1C9yha5Jn+S4JgQw@mail.gmail.com>

Thanks Samuel and Arnout, I have gotten something working now using your
suggestions
On Sun, 2013-05-26 at 14:16 +0200, Samuel Martin wrote:
> Hi John,
> 
> 2013/5/22 john <john.osullivan@cloudiumsystems.com>:
> > Hi,
> >
> > I have a cmake based project which I am trying to incorporate into
> > buildroot-2012.05
> >
> > As part of the configuration of the code I need to pass it an
> > environment variable $(CLIENT_VER) which I generate at the time of
> > building in the source directory (which I check out of SVN).
> > I have tried various approaches without success.
> >
> > This is my mk file
> > #I first tried this approach by generating the cmake configuration
> > #command with a script and then executing that script
> > #but the problem here was I would need to know the location of the
> > #buildroot generated version of cmake and the toolchain file
> > #I could figure these out in the script but I felt there must be a
> > #simpler approach
> > #define CLIENT_BARROW_CONFIGURE_CMDS
> > #       (cd $(CLIENT_BARROW_SRCDIR) && source set_environment.sh \
> > #       && ./cmake_run \
> > #       )
> > #endef
> 
> Does the set_environment.sh script do anything else than setting the
> CLIENT_VER env. var.?
> If this version number is stored in its own file, then another way is:
> CLIENT_BARROW_CONF_OPT += -DCLIENT_VER_STR="$(shell cat
> version_file.txt 2>/dev/null)"
> 
> Regards,
> 

      reply	other threads:[~2013-05-27  9:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 16:21 [Buildroot] Environment Variables and CMAKE john
2013-05-24 16:51 ` Arnout Vandecappelle
2013-05-26 12:16 ` Samuel Martin
2013-05-27  9:49   ` john [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369648173.2814.53.camel@john-ubu \
    --to=john.osullivan@cloudiumsystems.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox