[CMake] Re: Out of source build and KDevelop

Alexander Neundorf a.neundorf-work at gmx.net
Wed Oct 13 02:16:56 EDT 2004


> Hi Alex, 
>  
 
... 
> You have source directories and build directories (the one with output 
> are build). 
>  
> StartOutputDir is the one where CMake was called. HomeOutputDir is the 
> toplevel one. The current one is the one that the makefile will be 
> written in. 
>  
> So, the one you really want is the HomeOutputDir. 
>  
> 			Andy 
 
So let's say I have  
src/main/CMakeLists.txt 
src/main/sub/CMakeLists.txt 
build/main/ 
build/main/sub/ 
 
When creating the project files for main/sub/CMakeLists.txt I need the
directory 
"src/main/" (to enter it as project dir in foo.kdevelop). To get it I
currently use  
getPorperty("PROJECT_SOURCE_DIR"). 
I also need "build/main/sub/" since this is the place where foo.kdevelop and

foo.kdevelop.filelist are created. For this I use currently
StartOutputDir(). Seems 
to work. It shouldn't matter from which directory cmake was started (i.e.
whether 
explicitely by calling cmake from the main/ dir or implicitely by calling
make later 
on). It seems to do what I want. 
 
I also didn't understand how RelativePath() works. 
If I had e.g. /usr/src/test/blah/foo.cpp and as directory /usr/src/, it
returned 
../test/blah/foo.cpp. This is not what I expected ( test/blah/foo.cpp). 
 
Bye 
Alex 
 

-- 
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++



More information about the CMake mailing list