On 1/11/2012 1:31 PM, Rolf Eike Beer wrote:
Am Mittwoch 11 Januar 2012, 13:24:42 schrieben Sie:
The top-level CMakeLists.txt file in CMake needs to pre-load BZIP2_*
with whatever is needed to convince find_package(BZIP2) to use the
CMake-built cmbzip2 library.  If you're changing the Find module for
it then what needs to be pre-loaded may depend on which version of
CMake is used to configure the build of CMake.  It's a bit tricky.

I pushed an updated version to topic improve-findbzip2, hopefully that would
do it. Does this look sane?

Since you're changing the way that module looks for libraries you should
also fix up some historical wrongness in it.  The Module/readme.txt file
explains that BZIP2_LIBRARIES should not be a cache variable.  Instead
it should be a normal variable that collects the results from other
single-library searches.  Ideally the module (with config support) should
offer these cache entries for users to set:

 BZIP2_LIBRARY_RELEASE
 BZIP2_LIBRARY_DEBUG

and the output should all be in a single

 set(BZIP2_LIBRARIES optimized ${BZIP2_LIBRARY_RELEASE}
                         debug ${BZIP2_LIBRARY_DEBUG})

cmake variable (not cached) whose content is adjusted for various
combinations of availability of each piece.  For compatibility you need
to honor BZIP2_LIBRARIES if it is set before the module is loaded, but you
do not need to cache it.

> Should I merge it into next or revert the last patch on next?

Which is the "last patch"?

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to