KDE/kdelibs/cmake/modules

Allen Winter winter at kde.org
Mon Mar 20 00:09:58 GMT 2006


On Sunday 19 March 2006 19:00, Michael Pyne wrote:
> On Sunday 19 March 2006 18:53, Allen Winter wrote:
> > On Sunday 19 March 2006 18:20, David Faure wrote:
> > > On Sunday 19 March 2006 23:23, Allen Winter wrote:
> > > > SVN commit 520422 by winterz:
> > > >
> > > > Support the KDEDIR environment variable for the installation prefix.
> > > > So you don't have to add -DCMAKE_INSTALL_PREFIX to the cmake command
> > > > line if you'd rather use good old reliable $KDEDIR.
> > >
> > > So by default kdelibs-4 overwrites your existing kdelibs3, if you forget
> > > to change KDEDIR before compiling it? Sounds a bit dangerous to me...
> > > Not that I oppose the idea in itself, but maybe we should detect that
> > > case and error out...
> >
> > Dangerous?  Of course.
> > We live on the bleeding edge, right?
> >
> > Did we do a version check when we moved from KDE2 to KDE3 and configure
> > used $KDEDIR for both? I guess I don't see how this is different from how
> > things are when using configure up to this point for KDE4 dev.
> >
> > Maybe I can do something like
> >  if(exists $KDEDIR/include/kdeversion.h && grep KDE_VERSION_MAJOR
> > $KDEDIR/include/kdeversion.h == 3) warn you about to do something
> > dangerous.  exiting...
> > endif
> 
> I'd rather that the env var wasn't used if the command line option was used, 
> since that corresponds to standard option reading practices.
> 
> i.e. search first on command line, then in environment, then user settings, 
> then system default settings.
> 
That I don't know how to do.
The CMAKE_INSTALL_PREFIX variable comes from a place I don't know.
And I have no idea how to detect if it is defined from the cmake command line.

IOW: I don't know how to write the following psuedo-code in cmake talk:
if( $KDEDIR && !commandlinedefines(CMAKE_INSTALL_PREFIX))
  CMAKE_INSTALL_PREFIX=$KDEDIR
endif

 
-- 
Let's Keep the Political Talk Out of KDE PLEASE




More information about the kde-core-devel mailing list