MantisBT - CMake
View Issue Details
0007593CMakeModulespublic2008-09-02 18:492009-02-23 22:47
J. Bedouet 
Philip Lowman 
normalminoralways
closedduplicate 
CMake-2-6 
CMake-2-6 
0007593: CMake can't find Boost libraries under Windows
Under Windows, I can't find Boost libraries.

I have downloaded Multithread DLL for Visual Studio 2003 and tried to find
them with CMake 2.6-1. Boost version is 1.35
CMake finds headers but can't find libraries. CMake search the following
directories :

   - C:/boost/lib
   - C:/boost
   -
   $ENV{ProgramFiles}/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}
   - $ENV{ProgramFiles}/Boost

Standard Boost installer installs libraries to "C:\Program
Files\boost\boost_1_35_0\lib".
I suggest this patch. After reading Boost_LIB_VERSION and Boost_VERSION in boost/version.hpp, we could add path
$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib
to library search dirs. It works fine for me.



  IF(Boost_INCLUDE_DIR)
    ...
    IF(NOT "${Boost_VERSION}" STREQUAL "0")
      ...
    ENDIF(NOT "${Boost_VERSION}" STREQUAL "0")

> SET(_boost_LIBRARIES_SEARCH_DIRS
> ${_boost_LIBRARIES_SEARCH_DIRS}
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
> )

  ELSE(Boost_INCLUDE_DIR)
    ...
  ENDIF(Boost_INCLUDE_DIR)
No tags attached.
duplicate of 0008326closed Philip Lowman [patch] FindBoost cannot find libraries from Boost Consulting (_boost_LIBRARIES_SEARCH_DIRS issue) 
Issue History
2008-09-02 18:49J. BedouetNew Issue
2008-09-02 21:20Bill HoffmanStatusnew => assigned
2008-09-02 21:20Bill HoffmanAssigned To => Douglas Gregor
2009-01-10 09:26Alex NeundorfCategoryCMake => Modules
2009-01-15 02:50Philip LowmanNote Added: 0014567
2009-01-19 20:21Philip LowmanRelationship addedduplicate of 0008326
2009-01-19 20:22Philip LowmanNote Added: 0014630
2009-01-19 20:22Philip LowmanAssigned ToDouglas Gregor => Philip Lowman
2009-01-19 20:22Philip LowmanStatusassigned => resolved
2009-01-19 20:22Philip LowmanResolutionopen => duplicate
2009-02-23 22:47Philip LowmanStatusresolved => closed
2009-02-23 22:47Philip LowmanFixed in Version => CMake-2-6

Notes
(0014567)
Philip Lowman   
2009-01-15 02:50   
Yes, also duplicated here: http://public.kitware.com/Bug/view.php?id=8326 [^]

I'll have a fix posted for this soon.
(0014630)
Philip Lowman   
2009-01-19 20:22   
Issue fixed in duplicate bug entry.

lowman@locke:~/cvs/CMake_write/Modules$ cvs commit FindBoost.cmake
Committer: Philip Lowman <philip@yhbt.com>
/cvsroot/CMake/CMake/Modules/FindBoost.cmake,v <-- FindBoost.cmake
new revision: 1.18; previous revision: 1.17