[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Build problems and solutions
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2007-08-28 2:10:29
Message-ID: 200708272210.29898.neundorf () kde ! org
[Download RAW message or body]

On Monday 27 August 2007 19:06, Mosfet wrote:
> I came home this morning in a pretty good mood. I was going to make a
> simple commit so Blitz doesn't conflict on Debian and then go to bed. What
> could possibly go wrong with such a simple thing? >:)
>
> Well, apparently more than I expected. If your having problems building KDE
> because of Blitz you need to make sure you do the following:
>
> 1) You need to reinstall Blitz from kdesupport.
> 2) There is an updated FindBlitz cmake module in kdelibs/cmake/modules.
> This needs to be installed.
> 3) You need to delete your CMake cache file in your build directory so the
> updated FindBlitz will run.

Some tips how to make such transitions smoother:

now that Blitz is named QImageBlitz, it might be a good idea to rename the 
module from FindBlitz.cmake to FindQImageBlitz.cmake, along with the 
variables it defines.

If this is done, simply removing the "old" FindBlitz.cmake would cause cmake 
errors like "Blitz_DIR not set" for the FIND_PACKAGE() call.
Instead it is better to leave a FindBlitz.cmake there, which looks like this:
MESSAGE(FATAL_ERROR "FIND_PACKAGE(Blitz) has been called, this is deprecated.
                     Please use FIND_PACKAGE(QImageBlitz) instead.")
This will give the user a better idea what went wrong. After this has been in 
svn for some time it can be removed then.

This has the additional advantage that FindQImageBlitz.cmake will define 
variables QIMAGEBLITZ_LIBRARIES etc., i.e. which have no previous value in 
the CMakeCache.txt so the check will run again.

At the same time here in FindQImageBlitz.cmake or the modified FindBlitz.cmake 
can do something like:
SET(BLITZ_INCLUDE_DIR NOTFOUND CACHE STRING "Deprecated" FORCE)
for all variables which went into the cache before, so these will be set to 
NOTFOUND, which will cause the most useful error messages from cmake we can 
get for this if they are used for TARGET_LINK_LIBRARIES() or 
INCLUDE_DIRECTORIES().

With cmake cvs we could add a "watch" on the old variables so cmake complains 
as soon as they are referenced. We could do something like this, which would 
make it compatible:
IF(NOT COMMAND VARIABLE_WATCH)
  MACRO(VARIABLE_WATCH)
  ENDMACRO(VARIABLE_WATCH)
ENDIF(NOT COMMAND VARIABLE_WATCH)
WATCH_VARIABLE(BLITZ_INCLUDE_DIR ...)
(haven't used it myself yet).

Bye
Alex
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic