undef HALF_FREQUENCY_SENDING_TO_CLIENT
[ryzomcore.git] / CMakeModules / FindMyBoost.cmake
blobdb7a5bc2d0aa0dffbd9e6f1131d8ea36e033761b
1 SET(BOOST_LIBRARIES)\r
2 \r
3 FIND_PACKAGE_HELPER(Boost boost/version.hpp QUIET)\r
4 \r
5 IF(BOOST_INCLUDE_DIR)\r
6   IF(NOT BOOST_VERSION)\r
7     PARSE_VERSION_OTHER(${BOOST_INCLUDE_DIR}/boost/version.hpp BOOST_VERSION)\r
8 \r
9     IF(BOOST_VERSION)\r
10       # Hack because patch is base 100 and minor version is base 1000\r
11       CONVERT_NUMBER_VERSION(${BOOST_VERSION}0 1000 _VERSIONS)\r
12       LIST(GET _VERSIONS 0 BOOST_VERSION_PATCH)\r
13       LIST(GET _VERSIONS 1 BOOST_VERSION_MINOR)\r
14       LIST(GET _VERSIONS 2 BOOST_VERSION_MAJOR)\r
15       SET(BOOST_VERSION "${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}")\r
16     ENDIF()\r
17   ENDIF()\r
19   SET(BOOST_FOUND ON)\r
20 ELSE()\r
21   MESSAGE(FATAL_ERROR "Unable to find Boost")\r
22 ENDIF()\r
24 FOREACH(COMPONENT ${MyBoost_FIND_COMPONENTS})\r
25   SET(_NAME Boost${COMPONENT})\r
26   STRING(TOUPPER ${_NAME} _UPNAME)\r
28   SET(${_NAME}_FIND_REQUIRED ${MyBoost_FIND_REQUIRED})\r
30   IF(MSVC15)\r
31     SET(_COMPILER "vc150")\r
32   ELSEIF(MSVC14)\r
33     SET(_COMPILER "vc140")\r
34   ELSEIF(MSVC13)\r
35     SET(_COMPILER "vc130")\r
36   ELSEIF(MSVC12)\r
37     SET(_COMPILER "vc120")\r
38   ELSEIF(MSVC11)\r
39     SET(_COMPILER "vc110")\r
40   ELSEIF(MSVC10)\r
41     SET(_COMPILER "vc100")\r
42   ELSEIF(MSVC90)\r
43     SET(_COMPILER "vc90")\r
44   ELSEIF(MSVC80)\r
45     SET(_COMPILER "vc80")\r
46   ELSEIF(MINGW)\r
47     SET(_COMPILER "mingw")\r
48   ELSE()\r
49     SET(_COMPILER "unknown")\r
50   ENDIF()\r
52   SET(_VERSION "${BOOST_VERSION_MAJOR}_${BOOST_VERSION_MINOR}")\r
54   IF(DEFINED BOOST_DIR)\r
55     SET(${_UPNAME}_DIR ${BOOST_DIR})\r
56   ENDIF()\r
58   FIND_PACKAGE_HELPER(${_NAME} boost/version.hpp\r
59     RELEASE boost_${COMPONENT}-${_COMPILER}-mt-${_VERSION} boost_${COMPONENT}-mt boost_${COMPONENT}\r
60     DEBUG boost_${COMPONENT}-${_COMPILER}-mt-gd-${_VERSION} boost_${COMPONENT}-mt-gd boost_${COMPONENT}-gd\r
61     QUIET)\r
63   IF(${_UPNAME}_FOUND)\r
64     LIST(APPEND BOOST_LIBRARIES ${${_UPNAME}_LIBRARIES})\r
65   ENDIF()\r
66 ENDFOREACH()\r
68 MESSAGE_VERSION_PACKAGE_HELPER(Boost ${BOOST_VERSION} ${BOOST_LIBRARIES})\r