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

Reply via email to