On 08.04.08 16:43:30, Doug Gregor wrote:
> On Tue, Apr 8, 2008 at 5:54 AM, Andreas Pakulat <[EMAIL PROTECTED]> wrote:
> >  New version uploaded.
> 
> I've looked through this module a bit, and it looks like it's in great
> shape. I have a few suggestions, implemented in the attached
> FindBoost.cmake; the diff against "v9" from the bug tracker follows.
> The changes I made where:
> 
>   - Fixed setting of Boost_LIBRARIES when the QUIET option is passed
> to FIND_PACKAGE
>   - Made non-user-configurable cache entries INTERNAL; mark other
> options advanced
>   - Minor formatting changes for some of the output.
> 
> I don't have a Windows machine easily available, so I'd like to take
> it for a spin on Windows as well.

Did so and of course a few small changes where needed :) I'll attach a
diff of those needed changes. With those changes cmake properly finds
the static libs if I provide the Boost_USE_STATIC_LIBS and it finds the
import libraries for the .dll's if I don't provide it (which I assume is
the right thing). It also properly finds debug vs. release versions of
the libraries.

This was with MSVC8, but I don't think there are any problems with other
MSVC versions.

If you need a test with MinGW too that will take a bit as I'll have to
set that up and compile boost first for that (not sure if its even
supported from boost's side).

Andreas

-- 
Be cautious in your daily affairs.
--- FindBoost_doug.cmake	2008-04-09 11:46:17.000000000 +0200
+++ FindBoost_win32_changes.cmake	2008-04-09 11:51:11.000000000 +0200
@@ -209,7 +209,7 @@
 
   SET(_boost_INCLUDE_SEARCH_DIRS
     C:/boost/include
-    "C:/Program Files/boost/boost_${Boost_MINIMUM_VERSION}"
+    "C:/Program Files/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}"
     # D: is very often the cdrom drive, IF you don't have a
     # cdrom inserted it will popup a very annoying dialog
     #D:/boost/include
@@ -218,7 +218,7 @@
 
   SET(_boost_LIBRARIES_SEARCH_DIRS
     C:/boost/lib
-    "C:/Program Files/boost/boost_${Boost_MINIMUM_VERSION}/lib"
+    "C:/Program Files/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}/lib"
     /sw/local/lib
   )
 
@@ -236,16 +236,20 @@
   ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
 
   IF( BOOST_ROOT )
-    SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${_boost_INCLUDE_SEARCH_DIRS})
+    IF( WIN32 )
+      SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT} ${_boost_INCLUDE_SEARCH_DIRS})
+    ELSE( WIN32 )
+      SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${_boost_INCLUDE_SEARCH_DIRS})
+    ENDIF( WIN32 )
     SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_ROOT}/lib ${_boost_LIBRARIES_SEARCH_DIRS})
   ENDIF( BOOST_ROOT )
 
   IF( BOOST_INCLUDEDIR )
-    SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR}/include ${_boost_INCLUDE_SEARCH_DIRS})
+    SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
   ENDIF( BOOST_INCLUDEDIR )
 
   IF( BOOST_LIBRARYDIR )
-    SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_LIBRARYDIR}/include ${_boost_LIBRARIES_SEARCH_DIRS})
+    SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
   ENDIF( BOOST_LIBRARYDIR )
 
   #Try first in our own include search paths (e.g. BOOST_ROOT)
@@ -325,9 +329,9 @@
 
   #Setting some more suffixes for the library
   SET (Boost_LIB_PREFIX "")
-  IF ( WIN32 )
+  IF ( WIN32 AND Boost_USE_STATIC_LIBS )
     SET (Boost_LIB_PREFIX "lib")
-  ENDIF ( WIN32 )
+  ENDIF ( WIN32 AND Boost_USE_STATIC_LIBS )
   SET (_boost_COMPILER "-gcc")
   IF (MSVC71)
     SET (_boost_COMPILER "-vc71")
@@ -373,7 +377,9 @@
   SET( _boost_STATIC_TAG "")
   IF (WIN32)
     SET (_boost_ABI_TAG "g")
-    SET( _boost_STATIC_TAG "-s")
+    IF( Boost_USE_STATIC_LIBS )
+      SET( _boost_STATIC_TAG "-s")
+    ENDIF( Boost_USE_STATIC_LIBS )
   ENDIF(WIN32)
   SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
 
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to