Changeset 1776 for code/trunk/cmake/FindBoost.cmake
- Timestamp:
- Sep 13, 2008, 9:32:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/cmake/FindBoost.cmake
r1505 r1776 2 2 # use with cation 3 3 # Nicolas Schlumberger <nico AT orxonx DOT net> (C) 2007 4 # 5 # Several changes and additions by Fabian 'x3n' Landau 6 # > www.orxonox.net < 4 7 # 5 8 # - Find the Boost includes and libraries. … … 50 53 # INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) 51 54 # LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) 52 #53 # In Windows, we make the assumption that, if the Boost files are installed, the default directory54 # will be C:\boost.55 55 56 56 # … … 60 60 # to use Link Directories. 61 61 # 62 63 IF (Boost_INCLUDE_DIR) 64 SET (Boost_INCLUDE_FIND_QUIETLY TRUE) 65 ENDIF (Boost_INCLUDE_DIR) 62 66 63 67 IF(WIN32) … … 75 79 # BOOST_LIB_DIAGNOSTIC will cause the auto-linking code to emit a #pragma message each time 76 80 # a library is selected for linking. 77 SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC")81 # SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC") 78 82 # SET(Boost_LIB_PREFIX "lib") 79 83 # SET(Boost_LIB_SUFFIX "gcc-mt-1_33_1.lib") … … 81 85 82 86 83 SET(BOOST_INCLUDE_PATH_DESCRIPTION "directory containing the boost include files. E.g /usr/local/include/boost-1_33_1 or c:\\boost\\include\\boost-1_33_1")87 SET(BOOST_INCLUDE_PATH_DESCRIPTION "directory containing the boost include files.") 84 88 85 89 SET(BOOST_DIR_MESSAGE "Set the Boost_INCLUDE_DIR cmake cache entry to the ${BOOST_INCLUDE_PATH_DESCRIPTION}") … … 90 94 SET(BOOST_DIR_SEARCH ${BOOST_DIR_SEARCH}/include) 91 95 ENDIF(BOOST_DIR_SEARCH) 92 93 IF(WIN32)94 SET(BOOST_DIR_SEARCH95 ${BOOST_DIR_SEARCH}96 C:/boost/include97 D:/boost/include98 )99 ENDIF(WIN32)100 96 101 97 # Add in some path suffixes. These will have to be updated whenever a new Boost version comes out. … … 114 110 # Look for an installation. 115 111 # 116 IF(WIN32) 117 SET(Boost_INCLUDE_DIR 112 FIND_PATH(Boost_INCLUDE_DIR NAMES boost/config.hpp PATH_SUFFIXES ${SUFFIX_FOR_PATH} PATHS 113 114 # Look in other places. 115 ${BOOST_DIR_SEARCH} 116 118 117 # ../libs/boost_1_33_1 119 118 ../libs/boost_1_34_1 120 # ../libs/boost_1_35_0 121 ) 122 ELSE(WIN32) 123 FIND_PATH(Boost_INCLUDE_DIR NAMES boost/config.hpp PATH_SUFFIXES ${SUFFIX_FOR_PATH} PATHS 124 125 # Look in other places. 126 ${BOOST_DIR_SEARCH} 119 # ../libs/boost-1_35_0 127 120 128 121 # Help the user find it if we cannot. 129 DOC "The ${BOOST_INCLUDE_PATH_DESCRIPTION}" 130 ) 131 ENDIF(WIN32) 122 DOC "The ${BOOST_INCLUDE_PATH_DESCRIPTION}" 123 ) 132 124 133 125 # Assume we didn't find it. … … 175 167 MARK_AS_ADVANCED(Boost_INCLUDE_DIR) 176 168 ENDIF(EXISTS "${Boost_INCLUDE_DIR}") 177 178 169 IF(Boost_LIBRARY_DIR AND EXISTS "${Boost_LIBRARY_DIR}") 179 170 SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR}) … … 260 251 MARK_AS_ADVANCED(Boost_${name}_LIBRARY Boost_${name}_LIBRARY_DEBUG) 261 252 ELSE(Boost_${name}_LIBRARY) 262 MESSAGE(STATUS "sdfds")263 253 IF(NOT Boost_FIND_QUIETLY) 264 MESSAGE(S TATUS"Boost ${name} library was not found.")254 MESSAGE(SEND_ERROR "Boost ${name} library was not found.") 265 255 ELSE(NOT Boost_FIND_QUIETLY) 266 256 IF(Boost_FIND_REQUIRED_${name}) … … 284 274 SET(Boost_LIBRARIES) 285 275 FOREACH(library ${Boost_FIND_LIBRARIES}) 276 IF (Boost_${library}_LIBRARY) 277 SET (Boost_${name}_LIBRARY_FIND_QUIETLY TRUE) 278 ENDIF (Boost_${library}_LIBRARY) 279 286 280 BOOST_FIND_LIBRARY(${library}) 287 281 IF(Boost_${library}_FOUND) 288 282 SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${library}_LIBRARIES}) 289 MESSAGE(STATUS "Found BoostLibrary: ${library}") 283 IF (NOT Boost_${name}_LIBRARY_FIND_QUIETLY) 284 MESSAGE(STATUS "Found BoostLibrary: ${library}") 285 IF (VERBOSE_FIND) 286 MESSAGE (STATUS " library path: ${Boost_${library}_LIBRARIES}") 287 ENDIF (VERBOSE_FIND) 288 ENDIF (NOT Boost_${name}_LIBRARY_FIND_QUIETLY) 290 289 ENDIF(Boost_${library}_FOUND) 291 290 ENDFOREACH(library) 291 ELSE(Boost_LIBRARY_DIRS) 292 MESSAGE(SEND_ERROR "Boost libraries not found: ${Boost_FIND_COMPONENTS}") 292 293 ENDIF(Boost_LIBRARY_DIRS) 293 294 294 295 IF(NOT Boost_FOUND) 295 296 IF(NOT Boost_FIND_QUIETLY) 296 MESSAGE(S TATUS"Boost was not found. ${BOOST_DIR_MESSAGE}")297 MESSAGE(SEND_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}") 297 298 ELSE(NOT Boost_FIND_QUIETLY) 298 299 IF(Boost_FIND_REQUIRED) 299 MESSAGE( FATAL_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}")300 MESSAGE(SEND_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}") 300 301 ENDIF(Boost_FIND_REQUIRED) 301 302 ENDIF(NOT Boost_FIND_QUIETLY) 303 ELSE(NOT Boost_FOUND) 304 IF (NOT Boost_INCLUDE_FIND_QUIETLY) 305 MESSAGE(STATUS "Boost include path was found.") 306 IF (VERBOSE_FIND) 307 MESSAGE (STATUS " include path: ${Boost_INCLUDE_DIR}") 308 ENDIF (VERBOSE_FIND) 309 ENDIF (NOT Boost_INCLUDE_FIND_QUIETLY) 302 310 ENDIF(NOT Boost_FOUND) 311
Note: See TracChangeset
for help on using the changeset viewer.