WtFindBoost-vintage.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. # This file sets:
  2. # - BOOST_INCLUDE_DIRS
  3. # - BOOST_LIB_DIRS
  4. # - BOOST_WT_FOUND // All dependencies for wt found
  5. # - BOOST_WT_MT_FOUND
  6. # - BOOST_WTHTTP_FOUND // All dependencies for wthttp found
  7. # - BOOST_WTHTTP_MT_FOUND
  8. # - BOOST_SUPPORT_LIBRARIES (should always be added to the boost libs)
  9. #
  10. # Separate compiled boost libraries are also discovered:
  11. # - BOOST_DT_LIB
  12. # - BOOST_FS_LIB
  13. # - BOOST_RANDOM_LIB
  14. # - BOOST_REGEX_LIB
  15. # - BOOST_PO_LIB
  16. # - BOOST_SIGNALS_LIB
  17. # - BOOST_SYSTEM_LIB
  18. # - BOOST_THREAD_LIB (only if BOOST_MT_FOUND)
  19. # Boost will try to find the same kind (mt or not) of library for all three
  20. # of these libraries. Boost is considered to be found successfully only
  21. # when the libraries are all of the same kind (mt or not). If the mt
  22. # libraries exits, the mt versions will be used unless MULTI_THREADED is
  23. # set to OFF. Otherwise, the non-mt versions will be used.
  24. FIND_PATH(BOOST_INCLUDE_DIRS
  25. boost/lexical_cast.hpp
  26. PATHS
  27. ${BOOST_PREFIX}/include
  28. ${BOOST_PREFIX}/include/${BOOST_VERSION}
  29. ${BOOST_PREFIX}/include/boost-${BOOST_VERSION}
  30. ${BOOST_PREFIX}
  31. NO_DEFAULT_PATH
  32. )
  33. #SET (BOOST_LIB_DIRS "${BOOST_PREFIX}/lib ${BOOST_PREFIX}/lib64")
  34. SET (BOOST_LIB_DIRS ${BOOST_PREFIX}/lib)
  35. IF(MSVC)
  36. # FIXME: write some TRY_COMPILEs here to verify that these libs exist
  37. SET(BOOST_SUPPORT_LIBRARIES "")
  38. ELSE(MSVC)
  39. IF (USE_BOOST_FRAMEWORK)
  40. # Finds a boost.framework, through CMAKE_FRAMEWORK_PATH
  41. FIND_LIBRARY(BOOST_FRAMEWORK_LIB
  42. NAMES
  43. boost
  44. PATHS
  45. ${BOOST_LIB_DIRS}
  46. )
  47. SET(BOOST_THREAD_LIB ${BOOST_FRAMEWORK_LIB})
  48. SET(BOOST_REGEX_LIB ${BOOST_FRAMEWORK_LIB})
  49. IF(NOT WT_NO_BOOST_RANDOM)
  50. SET(BOOST_RANDOM_LIB ${BOOST_FRAMEWORK_LIB})
  51. ELSE(NOT WT_NO_BOOST_RANDOM)
  52. SET(BOOST_RANDOM_LIB "")
  53. ENDIF(NOT WT_NO_BOOST_RANDOM)
  54. SET(BOOST_PO_LIB ${BOOST_FRAMEWORK_LIB})
  55. SET(BOOST_DT_LIB ${BOOST_FRAMEWORK_LIB})
  56. SET(BOOST_SIGNALS_LIB ${BOOST_FRAMEWORK_LIB})
  57. SET(BOOST_SYSTEM_LIB ${BOOST_FRAMEWORK_LIB})
  58. SET(BOOST_FS_LIB ${BOOST_FRAMEWORK_LIB})
  59. ELSE(USE_BOOST_FRAMEWORK)
  60. FIND_LIBRARY(BOOST_THREAD_LIB
  61. NAMES
  62. boost_thread-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
  63. boost_thread-${BOOST_COMPILER}-mt-${BOOST_VERSION}
  64. boost_thread-${BOOST_COMPILER}-mt
  65. boost_thread-mt-${BOOST_VERSION}
  66. boost_thread-mt
  67. boost_thread-${BOOST_COMPILER}-${BOOST_VERSION}
  68. boost_thread-${BOOST_COMPILER}
  69. boost_thread-${BOOST_VERSION}
  70. boost_thread
  71. PATHS
  72. ${BOOST_LIB_DIRS}
  73. NO_DEFAULT_PATH
  74. )
  75. IF(NOT WT_NO_BOOST_RANDOM)
  76. FIND_LIBRARY(BOOST_RANDOM_LIB
  77. NAMES
  78. boost_random-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
  79. boost_random-${BOOST_COMPILER}-mt-${BOOST_VERSION}
  80. boost_random-${BOOST_COMPILER}-mt
  81. boost_random-${BOOST_VERSION}
  82. boost_random-mt
  83. boost_random-${BOOST_COMPILER}-${BOOST_VERSION}
  84. boost_random-${BOOST_COMPILER}
  85. boost_random-${BOOST_VERSION}
  86. boost_random
  87. PATHS
  88. ${BOOST_LIB_DIRS}
  89. NO_DEFAULT_PATH
  90. )
  91. ELSE(NOT WT_NO_BOOST_RANDOM)
  92. SET(BOOST_RANDOM_LIB "")
  93. ENDIF(NOT WT_NO_BOOST_RANDOM)
  94. FIND_LIBRARY(BOOST_REGEX_LIB
  95. NAMES
  96. boost_regex-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
  97. boost_regex-${BOOST_COMPILER}-mt-${BOOST_VERSION}
  98. boost_regex-${BOOST_COMPILER}-mt
  99. boost_regex-mt-${BOOST_VERSION}
  100. boost_regex-mt
  101. boost_regex-${BOOST_COMPILER}-${BOOST_VERSION}
  102. boost_regex-${BOOST_COMPILER}
  103. boost_regex-${BOOST_VERSION}
  104. boost_regex
  105. PATHS
  106. ${BOOST_LIB_DIRS}
  107. NO_DEFAULT_PATH
  108. )
  109. FIND_LIBRARY(BOOST_PO_LIB
  110. NAMES
  111. boost_program_options-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
  112. boost_program_options-${BOOST_COMPILER}-mt-${BOOST_VERSION}
  113. boost_program_options-${BOOST_COMPILER}-mt
  114. boost_program_options-mt-${BOOST_VERSION}
  115. boost_program_options-mt
  116. boost_program_options-${BOOST_COMPILER}-${BOOST_VERSION}
  117. boost_program_options-${BOOST_COMPILER}
  118. boost_program_options-${BOOST_VERSION}
  119. boost_program_options
  120. PATHS
  121. ${BOOST_LIB_DIRS}
  122. NO_DEFAULT_PATH
  123. )
  124. FIND_LIBRARY(BOOST_DT_LIB
  125. NAMES
  126. boost_date_time-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
  127. boost_date_time-${BOOST_COMPILER}-mt-${BOOST_VERSION}
  128. boost_date_time-${BOOST_COMPILER}-mt
  129. boost_date_time-mt-${BOOST_VERSION}
  130. boost_date_time-mt
  131. boost_date_time-${BOOST_COMPILER}-${BOOST_VERSION}
  132. boost_date_time-${BOOST_COMPILER}
  133. boost_date_time-${BOOST_VERSION}
  134. boost_date_time
  135. PATHS
  136. ${BOOST_LIB_DIRS}
  137. NO_DEFAULT_PATH
  138. )
  139. FIND_LIBRARY(BOOST_SIGNALS_LIB
  140. NAMES
  141. boost_signals-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
  142. boost_signals-${BOOST_COMPILER}-mt-${BOOST_VERSION}
  143. boost_signals-${BOOST_COMPILER}-mt
  144. boost_signals-mt-${BOOST_VERSION}
  145. boost_signals-mt
  146. boost_signals-${BOOST_COMPILER}-${BOOST_VERSION}
  147. boost_signals-${BOOST_COMPILER}
  148. boost_signals-${BOOST_VERSION}
  149. boost_signals
  150. PATHS
  151. ${BOOST_LIB_DIRS}
  152. NO_DEFAULT_PATH
  153. )
  154. FIND_LIBRARY(BOOST_SYSTEM_LIB
  155. NAMES
  156. boost_system-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
  157. boost_system-${BOOST_COMPILER}-mt-${BOOST_VERSION}
  158. boost_system-${BOOST_COMPILER}-mt
  159. boost_system-mt-${BOOST_VERSION}
  160. boost_system-mt
  161. boost_system-${BOOST_COMPILER}-${BOOST_VERSION}
  162. boost_system-${BOOST_COMPILER}
  163. boost_system-${BOOST_VERSION}
  164. boost_system
  165. PATHS
  166. ${BOOST_LIB_DIRS}
  167. NO_DEFAULT_PATH
  168. )
  169. FIND_LIBRARY(BOOST_FS_LIB
  170. NAMES
  171. boost_filesystem-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
  172. boost_filesystem-${BOOST_COMPILER}-mt-${BOOST_VERSION}
  173. boost_filesystem-${BOOST_COMPILER}-mt
  174. boost_filesystem-mt-${BOOST_VERSION}
  175. boost_filesystem-mt
  176. boost_filesystem-${BOOST_COMPILER}-${BOOST_VERSION}
  177. boost_filesystem-${BOOST_COMPILER}
  178. boost_filesystem-${BOOST_VERSION}
  179. boost_filesystem
  180. PATHS
  181. ${BOOST_LIB_DIRS}
  182. NO_DEFAULT_PATH
  183. )
  184. ENDIF (USE_BOOST_FRAMEWORK)
  185. # FIXME: todo for Linux
  186. SET(RT_LIB "rt")
  187. SET(OTHER_LIBS "-lpthread")
  188. SET(BOOST_SUPPORT_LIBRARIES "")
  189. ENDIF(MSVC)
  190. SET(BOOST_WT_FOUND FALSE)
  191. SET(BOOST_WT_MT_FOUND FALSE)
  192. SET(BOOST_WTHTTP_FOUND FALSE)
  193. SET(BOOST_WTHTTP_MT_FOUND FALSE)
  194. IF(BOOST_INCLUDE_DIRS)
  195. IF(MSVC)
  196. # This is not really tested by this script yet - assume availability
  197. SET(BOOST_WT_MT_FOUND TRUE)
  198. SET(BOOST_WT_FOUND TRUE)
  199. SET(BOOST_WTHTTP_MT_FOUND TRUE)
  200. SET(BOOST_WTHTTP_FOUND TRUE)
  201. SET(BOOST_WT_LIBRARIES "")
  202. SET(BOOST_WT_THREAD_LIBRARY "")
  203. SET(BOOST_WT_REGEX_LIBRARY "")
  204. SET(BOOST_WT_SIGNALS_LIBRARY "")
  205. SET(BOOST_WT_DT_LIBRARY "")
  206. SET(BOOST_WT_SYSTEM_LIBRARY "")
  207. SET(BOOST_WTHTTP_THREAD_LIBRARY "")
  208. SET(BOOST_WTHTTP_FS_LIBRARY "")
  209. SET(BOOST_WTHTTP_PO_LIBRARY "")
  210. SET(BOOST_WTHTTP_DT_LIBRARY "")
  211. ENDIF(MSVC)
  212. SET(BOOST_RANDOM_LIB_OK WT_NO_BOOST_RANDOM OR BOOST_RANDOM_LIB)
  213. IF(NOT BOOST_WT_FOUND
  214. AND MULTI_THREADED
  215. AND BOOST_THREAD_LIB
  216. AND BOOST_RANDOM_LIB_OK
  217. AND BOOST_REGEX_LIB
  218. AND BOOST_SIGNALS_LIB
  219. AND BOOST_SYSTEM_LIB
  220. AND BOOST_FS_LIB
  221. AND BOOST_DT_LIB)
  222. SET(BOOST_WT_MT_FOUND TRUE)
  223. SET(BOOST_WT_FOUND TRUE)
  224. SET(BOOST_WT_LIBRARIES
  225. ${BOOST_THREAD_LIB}
  226. ${BOOST_RANDOM_LIB}
  227. ${BOOST_REGEX_LIB}
  228. ${BOOST_SIGNALS_LIB}
  229. ${BOOST_SYSTEM_LIB}
  230. ${BOOST_FS_LIB}
  231. ${BOOST_DT_LIB})
  232. SET(BOOST_WT_THREAD_LIBRARY ${BOOST_THREAD_LIB})
  233. SET(BOOST_WT_RANDOM_LIBRARY ${BOOST_RANDOM_LIB})
  234. SET(BOOST_WT_REGEX_LIBRARY ${BOOST_REGEX_LIB})
  235. SET(BOOST_WT_SIGNALS_LIBRARY ${BOOST_SIGNALS_LIB})
  236. SET(BOOST_WT_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIB})
  237. SET(BOOST_WT_FS_LIBRARY ${BOOST_FS_LIB})
  238. SET(BOOST_WT_DT_LIBRARY ${BOOST_DT_LIB})
  239. ENDIF(NOT BOOST_WT_FOUND
  240. AND MULTI_THREADED
  241. AND BOOST_THREAD_LIB
  242. AND BOOST_RANDOM_LIB_OK
  243. AND BOOST_REGEX_LIB
  244. AND BOOST_SIGNALS_LIB
  245. AND BOOST_SYSTEM_LIB
  246. AND BOOST_FS_LIB
  247. AND BOOST_DT_LIB)
  248. IF(NOT BOOST_WT_FOUND
  249. AND BOOST_RANDOM_LIB_OK
  250. AND BOOST_REGEX_LIB
  251. AND BOOST_SIGNALS_LIB
  252. AND BOOST_SYSTEM_LIB
  253. AND BOOST_PO_LIB
  254. AND BOOST_FS_LIB
  255. AND BOOST_DT_LIB)
  256. SET(BOOST_WT_MT_FOUND FALSE)
  257. SET(BOOST_WT_FOUND TRUE)
  258. SET(BOOST_WT_LIBRARIES
  259. ${BOOST_RANDOM_LIB}
  260. ${BOOST_REGEX_LIB}
  261. ${BOOST_SIGNALS_LIB}
  262. ${BOOST_SYSTEM_LIB}
  263. ${BOOST_FS_LIB}
  264. ${BOOST_DT_LIB})
  265. SET(BOOST_WT_RANDOM_LIBRARY ${BOOST_RANDOM_LIB})
  266. SET(BOOST_WT_REGEX_LIBRARY ${BOOST_REGEX_LIB})
  267. SET(BOOST_WT_SIGNALS_LIBRARY ${BOOST_SIGNALS_LIB})
  268. SET(BOOST_WT_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIB})
  269. SET(BOOST_WT_DT_LIBRARY ${BOOST_DT_LIB})
  270. SET(BOOST_WT_FS_LIBRARY ${BOOST_FS_LIB})
  271. ENDIF(NOT BOOST_WT_FOUND
  272. AND BOOST_RANDOM_LIB_OK
  273. AND BOOST_REGEX_LIB
  274. AND BOOST_SIGNALS_LIB
  275. AND BOOST_SYSTEM_LIB
  276. AND BOOST_PO_LIB
  277. AND BOOST_FS_LIB
  278. AND BOOST_DT_LIB)
  279. IF(NOT BOOST_WTHTTP_FOUND
  280. AND MULTI_THREADED
  281. AND BOOST_THREAD_LIB
  282. AND BOOST_PO_LIB
  283. AND BOOST_DT_LIB)
  284. SET(BOOST_WTHTTP_MT_FOUND TRUE)
  285. SET(BOOST_WTHTTP_FOUND TRUE)
  286. SET(BOOST_WTHTTP_LIBRARIES
  287. ${BOOST_THREAD_LIB}
  288. ${BOOST_PO_LIB}
  289. ${BOOST_DT_LIB})
  290. SET(BOOST_WTHTTP_THREAD_LIBRARY ${BOOST_THREAD_LIB})
  291. SET(BOOST_WTHTTP_FS_LIBRARY ${BOOST_FS_LIB})
  292. SET(BOOST_WTHTTP_PO_LIBRARY ${BOOST_PO_LIB})
  293. SET(BOOST_WTHTTP_DT_LIBRARY ${BOOST_DT_LIB})
  294. ENDIF(NOT BOOST_WTHTTP_FOUND
  295. AND MULTI_THREADED
  296. AND BOOST_THREAD_LIB
  297. AND BOOST_PO_LIB
  298. AND BOOST_DT_LIB)
  299. IF(NOT BOOST_WTHTTP_FOUND
  300. AND BOOST_PO_LIB
  301. AND BOOST_DT_LIB)
  302. SET(BOOST_WTHTTP_MT_FOUND FALSE)
  303. SET(BOOST_WTHTTP_FOUND TRUE)
  304. SET(BOOST_WTHTTP_LIBRARIES
  305. ${BOOST_PO_LIB}
  306. ${BOOST_DT_LIB})
  307. SET(BOOST_WTHTTP_FS_LIBRARY ${BOOST_FS_LIB})
  308. SET(BOOST_WTHTTP_PO_LIBRARY ${BOOST_PO_LIB})
  309. SET(BOOST_WTHTTP_DT_LIBRARY ${BOOST_DT_LIB})
  310. ENDIF(NOT BOOST_WTHTTP_FOUND
  311. AND BOOST_PO_LIB
  312. AND BOOST_DT_LIB)
  313. ENDIF(BOOST_INCLUDE_DIRS)