[CMake] Boost, CMake, Visual Studio and Configurations....

Mike Jackson imikejackson at gmail.com
Tue Nov 20 00:12:15 EST 2007


I need an automated way to switching between debug libraries and
release libraries of boost  (and others) when using VS 2003.net
projects that are generated from CMake. I remember seeing somewhere
something like:

IF ( CMAKE_BUILD_TYPE MATCHES Debug )
  SET (BOOST_FILESYSTEM_LIB ${BOOST_FILESYSTEM_LIBRARY_DEBUG} )
ENDIF ( CMAKE_BUILD_TYPE MATCHES Debug )

IF ( CMAKE_BUILD_TYPE MATCHES Release )
  SET (BOOST_FILESYSTEM_LIB ${BOOST_FILESYSTEM_LIBRARY} )
ENDIF ( CMAKE_BUILD_TYPE MATCHES Release )

The first problem with this is that where ever I got my FindBoost from
BOOST_FILESYSTEM_LIBRARY_DEBUG is not defined.

1) Does someone have a really nice FindBoost.cmake file that I can use
in my project that has all this figured out.

2) How do I really set the library list so that VS will link against
the correct libraries from Boost.

3) Same for Qt 4

4) I have my own cmake files for expat, tiff and HDF5. What are some
tactics that people have used to rename libraries based on Debug or
Release.

Thanks for any help/input/tips/tricks

-- 
Mike Jackson
imikejackson _at_ gee-mail dot com


More information about the CMake mailing list