Code

fix finding boost for windows.
authorjohanengelen <johanengelen@users.sourceforge.net>
Sun, 30 Mar 2008 19:07:47 +0000 (19:07 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sun, 30 Mar 2008 19:07:47 +0000 (19:07 +0000)
CMakeScripts/FindBoost.cmake

index 68f178b613903dc0e6a7023fbf59b065131e89ff..e743d3310701a1b21507ab80eb6f36b87065ed37 100644 (file)
@@ -3,15 +3,18 @@
 # Defines:
 #  BOOST_INCLUDE
 
+
+# To find boost on Windows, use BOOST_PATH variable set by mingwenv.bat:
+SET(env_boost_path "$ENV{BOOST_PATH}")
+
 FIND_PATH(BOOST_INCLUDE_DIR boost/weak_ptr.hpp 
                             /usr/include 
                             /usr/local/include
-                            C:\\Boost\\Include
-                            C:\\Boost\\include\\boost-1_33_1 )
+                            env_boost_path )
 
 
 IF(MINGW)
-  SET (BOOST_ROOT C:\\Boost)
+  SET (BOOST_ROOT env_boost_path)
   FIND_LIBRARY( BOOST_PYTHON_LIBRARY 
                 libboost_python-mgw
                 PATHS ${BOOST_ROOT}\\lib )
@@ -20,9 +23,9 @@ IF(MINGW)
                 PATHS ${BOOST_ROOT}\\lib )
 ELSE(MINGW)
   FIND_LIBRARY( BOOST_PYTHON_LIBRARY NAMES boost_python
-                PATHS /usr/lib /usr/local/lib C:\\Boost\\lib )
+                PATHS /usr/lib /usr/local/lib ${BOOST_ROOT}\\lib )
   FIND_LIBRARY( BOOST_PYTHON_LIBRARY_DEBUG NAMES boost_python-d
-                PATHS /usr/lib /usr/local/lib C:\\Boost\\lib )
+                PATHS /usr/lib /usr/local/lib ${BOOST_ROOT}\\lib )
 ENDIF(MINGW)
 
 IF (BOOST_INCLUDE_DIR)