From: Alexander Dahl <post@lespocky.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] rpi-userland cmake problems
Date: Mon, 14 Oct 2013 10:31:59 +0200 [thread overview]
Message-ID: <232222b90ebee2d8729528ade3add902@idefix.lespocky.dyndns.org> (raw)
In-Reply-To: <2857003.DyaBUW7YkM@hydra>
Hei hei,
Am 2013-10-12 23:48, schrieb Tim Sander:
> The files are appended but the main lines are:
> RPI_USERLAND_CONF_TOOL := cmake
> RPI_USERLAND_CONF_OPT := $(CROSS_CMAKE_USR)
> -DVMCS_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_PREFIX=/usr
Maybe the problem is double defining CMAKE_INSTALL_PREFIX which is
already set in $(CROSS_CMAKE_USR), see:
% ptxdist print CROSS_CMAKE_USR
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
-DCMAKE_TOOLCHAIN_FILE='[removed]'
It's some time ago, but I guess we had the same problem.
$(CROSS_CMAKE_USR) is set in rules/pre/Rules.make from line 241:
241 CROSS_CMAKE_USR := \
242 -DCMAKE_INSTALL_PREFIX=/usr \
243 -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
244 -DCMAKE_TOOLCHAIN_FILE='${PTXDIST_CMAKE_TOOLCHAIN_TARGET}'
So what we do for our CMake based projects, if we want to change
CMAKE_INSTALL_PREFIX or CMAKE_BUILD_TYPE (changing the toolchain file
path makes no sense IMHO) we go like this:
54 FOO_CONF_TOOL := cmake
55 # this is $(CROSS_CMAKE_USR) but with adapted install prefix
56 FOO_CONF_OPT := \
57 -DCMAKE_INSTALL_PREFIX=$(PTXCONF_FOO_PREFIX) \
58 -DCMAKE_BUILD_TYPE:STRING=$(PTXCONF_FOO_BUILD_TYPE) \
59 -DCMAKE_TOOLCHAIN_FILE='${PTXDIST_CMAKE_TOOLCHAIN_TARGET}'
And then FOO_CONF_OPT += -DANYTHING=foo
PTXCONF_FOO_PREFIX and PTXCONF_FOO_BUILD_TYPE are more or less defined
in rules/foo.in and the comment is to remind we are overwriting ptxdist
defaults here. So what we actually do is not using CROSS_CMAKE_USR but
redefining the three variables it would set.
Greets
Alex
--
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2013-10-14 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-12 21:48 Tim Sander
2013-10-14 8:31 ` Alexander Dahl [this message]
2013-10-15 21:38 ` [ptxdist] rpi-userland cmake problems solved next stop qt5 Tim Sander
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=232222b90ebee2d8729528ade3add902@idefix.lespocky.dyndns.org \
--to=post@lespocky.de \
--cc=ptxdist@pengutronix.de \
/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