You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

445 lines
16 KiB

  1. # Locate the Pantheois Logging Framework.
  2. #
  3. # Defines the following variables:
  4. #
  5. # PANTHEIOS_FOUND - Found the Pantheios Logging Framework
  6. # PANTHEIOS_INCLUDE_DIRS - Include directories
  7. #
  8. # Accepts the following variables as input:
  9. #
  10. # PANTHEIOS_ROOT - (as a CMake or environment variable)
  11. # The root directory of the pantheios install prefix
  12. #
  13. # PANTHEIOS_USE_DYNAMIC_RUNTIME
  14. #
  15. # If you want to use splitting, specify LRSplit and than preface the components with L and R, so e.g. LRSplit LFile RSyslog
  16. # To use more than one BackEnd, specify NBackEnd followed by a list of components. NBackEnd requires the NFrontEnd.
  17. #
  18. # Possible Components for BackEnd:
  19. # ACELogger
  20. # COMErrorObject
  21. # File
  22. # FileCallback
  23. # FPrintf
  24. # FPrintfCallback
  25. # Null
  26. # Speech
  27. # Syslog
  28. # WindowsConsole
  29. # WindowsConsoleCallback
  30. # WindowsDebugger
  31. # WindowsDebuggerCallback
  32. # WindowsEventLog
  33. # WindowsMessageBox
  34. # WindowsSyslog
  35. # WindowsSyslogCallback
  36. #
  37. # Possible components for FrontEnd:
  38. # NoFrontEnd
  39. # SimpleFrontEnd
  40. # NFrontEnd
  41. #
  42. #
  43. #=============================================================================
  44. # Copyright 2012 Philipp Berger <admin@philippberger.de>
  45. #
  46. # Distributed under the OSI-approved BSD License (the "License");
  47. # see accompanying file Copyright.txt for details.
  48. #
  49. # This software is distributed WITHOUT ANY WARRANTY; without even the
  50. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  51. # See the License for more information.
  52. #=============================================================================
  53. # (To distribute this file outside of CMake, substitute the full
  54. # License text for the above reference.)
  55. #
  56. # Credits:
  57. #
  58. # HUGE thanks to Michael Wild
  59. # Additional thanks to:
  60. # Mateusz Loskot
  61. # Rolf Eike Beer
  62. # default for WideString option
  63. set(PANTHEIOS_WIDESTRING 0)
  64. # default for Front- and BackEnd
  65. set(PANTHEIOS_FRONTEND "simple")
  66. set(PANTHEIOS_BACKEND "file")
  67. set(PANTHEIOS_BACKEND_L OFF)
  68. set(PANTHEIOS_BACKEND_R OFF)
  69. set(PANTHEIOS_BACKEND_LIST)
  70. # Use FIND_PACKAGE( Pantheios COMPONENTS ... ) to enable modules
  71. if( Pantheios_FIND_COMPONENTS )
  72. list(FIND Pantheios_FIND_COMPONENTS "LRSplit" PANTHEIOS_use_lrsplit)
  73. list(FIND Pantheios_FIND_COMPONENTS "NFrontEnd" PANTHEIOS_use_nfe)
  74. list(FIND Pantheios_FIND_COMPONENTS "NBackEnd" PANTHEIOS_use_nbe)
  75. list(FIND Pantheios_FIND_COMPONENTS "WideString" PANTHEIOS_use_ws)
  76. list(REMOVE_ITEM Pantheios_FIND_COMPONENTS "LRSplit" "NFrontEnd" "NBackEnd" "WideString")
  77. if (NOT PANTHEIOS_use_ws EQUAL -1)
  78. # Use WideString
  79. set(PANTHEIOS_WIDESTRING 1)
  80. endif()
  81. if (NOT PANTHEIOS_use_lrsplit EQUAL -1)
  82. # Found LRSplit
  83. set(PANTHEIOS_BACKEND "lrsplit")
  84. if (NOT PANTHEIOS_use_nbe EQUAL -1)
  85. # Also found NBe
  86. message(FATAL_ERROR "Pantheios: Use either LRSplit or NBackEnd, not both.")
  87. endif()
  88. if (NOT PANTHEIOS_use_nfe EQUAL -1)
  89. # Also found NFe
  90. message(FATAL_ERROR "Pantheios: Use either LRSplit or NFrontEnd, not both.")
  91. endif()
  92. foreach( component ${Pantheios_FIND_COMPONENTS} )
  93. # LRSplit L BackEnds
  94. string(SUBSTRING ${component} 0 1 _sub_comp_head)
  95. string(LENGTH ${component} _length_comp)
  96. math(EXPR _length_comp_tail "${_length_comp} - 1")
  97. string(SUBSTRING ${component} 1 ${_length_comp_tail} _sub_comp_tail)
  98. if ((_sub_comp_tail STREQUAL "ACELogger") OR (_sub_comp_tail STREQUAL "COMErrorObject") OR (_sub_comp_tail STREQUAL "File") OR (_sub_comp_tail STREQUAL "FileCallback") OR (_sub_comp_tail STREQUAL "FPrintf") OR (_sub_comp_tail STREQUAL "FPrintfCallback") OR (_sub_comp_tail STREQUAL "Null") OR (_sub_comp_tail STREQUAL "Speech") OR (_sub_comp_tail STREQUAL "Syslog") OR (_sub_comp_tail STREQUAL "WindowsConsole") OR (_sub_comp_tail STREQUAL "WindowsConsoleCallback") OR (_sub_comp_tail STREQUAL "WindowsDebugger") OR (_sub_comp_tail STREQUAL "WindowsDebuggerCallback") OR (_sub_comp_tail STREQUAL "WindowsEventLog") OR (_sub_comp_tail STREQUAL "WindowsMessageBox") OR (_sub_comp_tail STREQUAL "WindowsSyslog") OR (_sub_comp_tail STREQUAL "WindowsSyslogCallback"))
  99. if ((_sub_comp_head STREQUAL L) OR (_sub_comp_head STREQUAL R))
  100. message(STATUS "Pantheios: Setting LRSplit BackEnd ${_sub_comp_head} to ${_sub_comp_tail}")
  101. string(TOLOWER ${_sub_comp_tail} _sub_comp_tail_low)
  102. set(PANTHEIOS_BACKEND_${_sub_comp_head} "${_sub_comp_tail_low}")
  103. else ()
  104. message(FATAL_ERROR "Pantheios: Internal Parsing Error")
  105. endif()
  106. # FrontEnds
  107. elseif (component STREQUAL "NoFrontEnd")
  108. message(STATUS "Pantheios: Setting FrontEnd to NoFrontEnd")
  109. set(PANTHEIOS_FRONTEND "null")
  110. elseif (component STREQUAL "SimpleFrontEnd")
  111. message(STATUS "Pantheios: Setting FrontEnd to SimpleFrontEnd")
  112. set(PANTHEIOS_FRONTEND "simple")
  113. else ()
  114. message(FATAL_ERROR "Unknown Component: ${component}")
  115. endif ()
  116. endforeach(component)
  117. elseif (NOT PANTHEIOS_use_nbe EQUAL -1)
  118. # Found NBackEnd
  119. if (PANTHEIOS_use_nfe EQUAL -1)
  120. message(FATAL_ERROR "Pantheios: Usage of NBackEnd requires the NFrontEnd.")
  121. endif()
  122. set(PANTHEIOS_BACKEND "N")
  123. set(PANTHEIOS_FRONTEND "N")
  124. foreach( component ${Pantheios_FIND_COMPONENTS} )
  125. # Std BackEnds
  126. if ((component STREQUAL "ACELogger") OR (component STREQUAL "COMErrorObject") OR (component STREQUAL "File") OR (component STREQUAL "FileCallback") OR (component STREQUAL "FPrintf") OR (component STREQUAL "FPrintfCallback") OR (component STREQUAL "Null") OR (component STREQUAL "Speech") OR (component STREQUAL "Syslog") OR (component STREQUAL "WindowsConsole") OR (component STREQUAL "WindowsConsoleCallback") OR (component STREQUAL "WindowsDebugger") OR (component STREQUAL "WindowsDebuggerCallback") OR (component STREQUAL "WindowsEventLog") OR (component STREQUAL "WindowsMessageBox") OR (component STREQUAL "WindowsSyslog") OR (component STREQUAL "WindowsSyslogCallback"))
  127. message(STATUS "Pantheios: Adding BackEnd ${component}")
  128. string(TOLOWER ${component} _low_comp)
  129. list(APPEND PANTHEIOS_BACKEND_LIST ${_low_comp})
  130. else ()
  131. message(FATAL_ERROR "Unknown Component: ${component}")
  132. endif ()
  133. endforeach(component)
  134. else ()
  135. # Simple, one FE, one BE
  136. foreach( component ${Pantheios_FIND_COMPONENTS} )
  137. if ((component STREQUAL "ACELogger") OR (component STREQUAL "COMErrorObject") OR (component STREQUAL "File") OR (component STREQUAL "FileCallback") OR (component STREQUAL "FPrintf") OR (component STREQUAL "FPrintfCallback") OR (component STREQUAL "Null") OR (component STREQUAL "Speech") OR (component STREQUAL "Syslog") OR (component STREQUAL "WindowsConsole") OR (component STREQUAL "WindowsConsoleCallback") OR (component STREQUAL "WindowsDebugger") OR (component STREQUAL "WindowsDebuggerCallback") OR (component STREQUAL "WindowsEventLog") OR (component STREQUAL "WindowsMessageBox") OR (component STREQUAL "WindowsSyslog") OR (component STREQUAL "WindowsSyslogCallback"))
  138. message(STATUS "Pantheios: Setting BackEnd to ${component}")
  139. string(TOLOWER ${component} _low_comp)
  140. set(PANTHEIOS_BACKEND ${_low_comp})
  141. # FrontEnds
  142. elseif (component STREQUAL "NoFrontEnd")
  143. message(STATUS "Pantheios: Setting FrontEnd to NoFrontEnd")
  144. set(PANTHEIOS_FRONTEND "null")
  145. elseif (component STREQUAL "SimpleFrontEnd")
  146. message(STATUS "Pantheios: Setting FrontEnd to SimpleFrontEnd")
  147. set(PANTHEIOS_FRONTEND "simple")
  148. else ()
  149. message(FATAL_ERROR "Unknown Component: ${component}")
  150. endif ()
  151. endforeach(component)
  152. endif ()
  153. endif(Pantheios_FIND_COMPONENTS)
  154. if (PANTHEIOS_USE_DYNAMIC_RUNTIME)
  155. set(PANTHEIOS_LIB_LINKTYPE "dll")
  156. else ()
  157. set(PANTHEIOS_LIB_LINKTYPE "mt")
  158. endif ()
  159. if(PANTHEIOS_INCLUDE_DIR)
  160. if (NOT PANTHEIOS_ROOT)
  161. get_filename_component(PANTHEIOS_ROOT "${PANTHEIOS_INCLUDE_DIR}" PATH)
  162. endif()
  163. get_filename_component(PANTHEIOS_ROOT_HINT "${PANTHEIOS_INCLUDE_DIR}" PATH)
  164. endif()
  165. find_path(PANTHEIOS_INCLUDE_DIR pantheios/pantheios.h
  166. PATH_SUFFIXES include
  167. HINTS ${PANTHEIOS_ROOT} ${PANTHEIOS_ROOT_HINT}
  168. ENV PANTHEIOS_ROOT
  169. )
  170. # No idea what the stuff for ICC et. al. is, so I don't handle it here...
  171. set(_P_COMP_TAG)
  172. set(_P_OS_TAG)
  173. set(_P_ARCH_TAG)
  174. if(MSVC)
  175. if(MSVC60)
  176. set(_P_COMP_TAG vc6)
  177. elseif(MSVC70)
  178. set(_P_COMP_TAG vc7)
  179. elseif(MSVC71)
  180. set(_P_COMP_TAG vc71)
  181. elseif(MSVC80)
  182. set(_P_COMP_TAG vc8)
  183. if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  184. set(_P_ARCH_TAG .x64)
  185. endif()
  186. elseif(MSVC90)
  187. set(_P_COMP_TAG vc9)
  188. if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  189. set(_P_ARCH_TAG .x64)
  190. endif()
  191. elseif(MSVC10)
  192. set(_P_COMP_TAG vc10)
  193. if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  194. set(_P_ARCH_TAG .x64)
  195. endif()
  196. endif()
  197. elseif(CMAKE_COMPILER_IS_GNUCC)
  198. execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
  199. string(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${GCC_VERSION})
  200. list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR)
  201. list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR)
  202. set(_P_COMP_TAG gcc${GCC_MAJOR}${GCC_MINOR})
  203. if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  204. set(_P_ARCH_TAG .file64bit)
  205. endif()
  206. else()
  207. message(FATAL_ERROR "Pantheios: Your compiler/environment is currently unsupported.")
  208. endif()
  209. set(_P_LIB_TAG ${_P_COMP_TAG}${_P_OS_TAG}${_P_ARCH_TAG})
  210. # Is this the right way?
  211. set(PANTHEIOS_INCLUDE_DIRS ${PANTHEIOS_INCLUDE_DIR})
  212. set(_P_REQUIRED_LIBVARS)
  213. set(PANTHEIOS_LIBRARIES)
  214. set(PANTHEIOS_LIBRARIES_DEBUG)
  215. set(PANTHEIOS_LIBRARIES_RELEASE)
  216. # core and util libraries
  217. foreach(l core util)
  218. find_library(PANTHEIOS_${l}_${PANTHEIOS_LIB_LINKTYPE}_DEBUG_LIBRARY
  219. pantheios.1.${l}.${_P_LIB_TAG}.${PANTHEIOS_LIB_LINKTYPE}.debug
  220. PATH_SUFFIXES lib
  221. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  222. ENV PANTHEIOS_ROOT
  223. )
  224. find_library(PANTHEIOS_${l}_${PANTHEIOS_LIB_LINKTYPE}_LIBRARY
  225. pantheios.1.${l}.${_P_LIB_TAG}.${PANTHEIOS_LIB_LINKTYPE}
  226. PATH_SUFFIXES lib
  227. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  228. ENV PANTHEIOS_ROOT
  229. )
  230. list(APPEND _P_REQUIRED_LIBVARS
  231. PANTHEIOS_${l}_${PANTHEIOS_LIB_LINKTYPE}_DEBUG_LIBRARY
  232. PANTHEIOS_${l}_${PANTHEIOS_LIB_LINKTYPE}_LIBRARY
  233. )
  234. list(APPEND PANTHEIOS_LIBRARIES
  235. debug ${PANTHEIOS_${l}_${PANTHEIOS_LIB_LINKTYPE}_DEBUG_LIBRARY}
  236. optimized ${PANTHEIOS_${l}_${PANTHEIOS_LIB_LINKTYPE}_LIBRARY}
  237. )
  238. endforeach()
  239. # set PANTHEIOS_LIBRARY_DIRS
  240. get_filename_component(PANTHEIOS_LIBRARY_DIRS ${PANTHEIOS_core_${PANTHEIOS_LIB_LINKTYPE}_LIBRARY} PATH)
  241. # backend libraries (split, sole, local, remote and common)
  242. set(_P_LT ${PANTHEIOS_LIB_LINKTYPE})
  243. set(_P_BE ${PANTHEIOS_BACKEND})
  244. find_library(PANTHEIOS_be_${_P_BE}_${_P_LT}_DEBUG_LIBRARY
  245. pantheios.1.be.${_P_BE}.${_P_LIB_TAG}.${_P_LT}.debug
  246. PATH_SUFFIXES lib
  247. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  248. ENV PANTHEIOS_ROOT
  249. )
  250. find_library(PANTHEIOS_be_${_P_BE}_${_P_LT}_LIBRARY
  251. pantheios.1.be.${_P_BE}.${_P_LIB_TAG}.${_P_LT}
  252. PATH_SUFFIXES lib
  253. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  254. ENV PANTHEIOS_ROOT
  255. )
  256. list(APPEND _P_REQUIRED_LIBVARS
  257. PANTHEIOS_be_${_P_BE}_${_P_LT}_DEBUG_LIBRARY
  258. PANTHEIOS_be_${_P_BE}_${_P_LT}_LIBRARY
  259. )
  260. list(APPEND PANTHEIOS_LIBRARIES
  261. debug ${PANTHEIOS_be_${_P_BE}_${_P_LT}_DEBUG_LIBRARY}
  262. optimized ${PANTHEIOS_be_${_P_BE}_${_P_LT}_LIBRARY}
  263. )
  264. if (_P_BE STREQUAL N)
  265. # N Backend, go through list
  266. message(STATUS "Pantheios: Dbg: Lib-n")
  267. foreach (blib PANTHEIOS_BACKEND_LIST)
  268. find_library(PANTHEIOS_bec_${blib}_${_P_LT}_DEBUG_LIBRARY
  269. pantheios.1.bec.${blib}.${_P_LIB_TAG}.${_P_LT}.debug
  270. PATH_SUFFIXES lib
  271. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  272. ENV PANTHEIOS_ROOT
  273. )
  274. find_library(PANTHEIOS_bec_${blib}_${_P_LT}_LIBRARY
  275. pantheios.1.bec.${blib}.${_P_LIB_TAG}.${_P_LT}
  276. PATH_SUFFIXES lib
  277. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  278. ENV PANTHEIOS_ROOT
  279. )
  280. list(APPEND _P_REQUIRED_LIBVARS
  281. PANTHEIOS_bec_${blib}_${_P_LT}_DEBUG_LIBRARY
  282. PANTHEIOS_bec_${blib}_${_P_LT}_LIBRARY
  283. )
  284. list(APPEND PANTHEIOS_LIBRARIES
  285. debug ${PANTHEIOS_bec_${blib}_${_P_LT}_DEBUG_LIBRARY}
  286. optimized ${PANTHEIOS_bec_${blib}_${_P_LT}_LIBRARY}
  287. )
  288. endforeach()
  289. elseif (_P_BE STREQUAL lrsplit)
  290. # LRSplit
  291. message(STATUS "Pantheios: Dbg: Lib-lrsplit")
  292. # Left side
  293. foreach (t bec bel)
  294. find_library(PANTHEIOS_${t}_${PANTHEIOS_BACKEND_L}_${_P_LT}_DEBUG_LIBRARY
  295. pantheios.1.${t}.${PANTHEIOS_BACKEND_L}.${_P_LIB_TAG}.${_P_LT}.debug
  296. PATH_SUFFIXES lib
  297. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  298. ENV PANTHEIOS_ROOT
  299. )
  300. find_library(PANTHEIOS_${t}_${PANTHEIOS_BACKEND_L}_${_P_LT}_LIBRARY
  301. pantheios.1.${t}.${PANTHEIOS_BACKEND_L}.${_P_LIB_TAG}.${_P_LT}
  302. PATH_SUFFIXES lib
  303. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  304. ENV PANTHEIOS_ROOT
  305. )
  306. list(APPEND _P_REQUIRED_LIBVARS
  307. PANTHEIOS_${t}_${PANTHEIOS_BACKEND_L}_${_P_LT}_DEBUG_LIBRARY
  308. PANTHEIOS_${t}_${PANTHEIOS_BACKEND_L}_${_P_LT}_LIBRARY
  309. )
  310. list(APPEND PANTHEIOS_LIBRARIES
  311. debug ${PANTHEIOS_${t}_${PANTHEIOS_BACKEND_L}_${_P_LT}_DEBUG_LIBRARY}
  312. optimized ${PANTHEIOS_${t}_${PANTHEIOS_BACKEND_L}_${_P_LT}_LIBRARY}
  313. )
  314. endforeach()
  315. # Right side
  316. foreach (t bec ber)
  317. find_library(PANTHEIOS_${t}_${PANTHEIOS_BACKEND_R}_${_P_LT}_DEBUG_LIBRARY
  318. pantheios.1.${t}.${PANTHEIOS_BACKEND_R}.${_P_LIB_TAG}.${_P_LT}.debug
  319. PATH_SUFFIXES lib
  320. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  321. ENV PANTHEIOS_ROOT
  322. )
  323. find_library(PANTHEIOS_${t}_${PANTHEIOS_BACKEND_R}_${_P_LT}_LIBRARY
  324. pantheios.1.${t}.${PANTHEIOS_BACKEND_R}.${_P_LIB_TAG}.${_P_LT}
  325. PATH_SUFFIXES lib
  326. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  327. ENV PANTHEIOS_ROOT
  328. )
  329. list(APPEND _P_REQUIRED_LIBVARS
  330. PANTHEIOS_${t}_${PANTHEIOS_BACKEND_R}_${_P_LT}_DEBUG_LIBRARY
  331. PANTHEIOS_${t}_${PANTHEIOS_BACKEND_R}_${_P_LT}_LIBRARY
  332. )
  333. list(APPEND PANTHEIOS_LIBRARIES
  334. debug ${PANTHEIOS_${t}_${PANTHEIOS_BACKEND_R}_${_P_LT}_DEBUG_LIBRARY}
  335. optimized ${PANTHEIOS_${t}_${PANTHEIOS_BACKEND_R}_${_P_LT}_LIBRARY}
  336. )
  337. endforeach()
  338. else ()
  339. # normal
  340. message(STATUS "Pantheios: Dbg: Lib-normal")
  341. foreach (t bec)
  342. find_library(PANTHEIOS_${t}_${PANTHEIOS_BACKEND}_${_P_LT}_DEBUG_LIBRARY
  343. pantheios.1.${t}.${PANTHEIOS_BACKEND}.${_P_LIB_TAG}.${_P_LT}.debug
  344. PATH_SUFFIXES lib
  345. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  346. ENV PANTHEIOS_ROOT
  347. )
  348. find_library(PANTHEIOS_${t}_${PANTHEIOS_BACKEND}_${_P_LT}_LIBRARY
  349. pantheios.1.${t}.${PANTHEIOS_BACKEND}.${_P_LIB_TAG}.${_P_LT}
  350. PATH_SUFFIXES lib
  351. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  352. ENV PANTHEIOS_ROOT
  353. )
  354. list(APPEND _P_REQUIRED_LIBVARS
  355. PANTHEIOS_${t}_${PANTHEIOS_BACKEND}_${_P_LT}_DEBUG_LIBRARY
  356. PANTHEIOS_${t}_${PANTHEIOS_BACKEND}_${_P_LT}_LIBRARY
  357. )
  358. list(APPEND PANTHEIOS_LIBRARIES
  359. debug ${PANTHEIOS_${t}_${PANTHEIOS_BACKEND}_${_P_LT}_DEBUG_LIBRARY}
  360. optimized ${PANTHEIOS_${t}_${PANTHEIOS_BACKEND}_${_P_LT}_LIBRARY}
  361. )
  362. endforeach()
  363. endif()
  364. # frontent libraries
  365. set(PANTHEIOS_fe_DEBUG_LIBRARY)
  366. set(PANTHEIOS_fe_LIBRARY)
  367. if(NOT PANTHEIOS_FRONTENT STREQUAL null)
  368. set(_P_FE ${PANTHEIOS_FRONTEND})
  369. find_library(PANTHEIOS_${_P_FE}_${_P_LT}_DEBUG_LIBRARY
  370. pantheios.1.fe.${_P_FE}.${_P_LIB_TAG}.${_P_LT}.debug
  371. PATH_SUFFIXES lib
  372. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  373. ENV PANTHEIOS_ROOT
  374. )
  375. find_library(PANTHEIOS_${_P_FE}_${_P_LT}_LIBRARY
  376. pantheios.1.fe.${_P_FE}.${_P_LIB_TAG}.${_P_LT}
  377. PATH_SUFFIXES lib
  378. HINTS ${PANTHEIOS_ROOT_HINT} ${PANTHEIOS_ROOT}
  379. ENV PANTHEIOS_ROOT
  380. )
  381. list(APPEND _P_REQUIRED_LIBVARS
  382. PANTHEIOS_${_P_FE}_${_P_LT}_DEBUG_LIBRARY
  383. PANTHEIOS_${_P_FE}_${_P_LT}_LIBRARY
  384. )
  385. list(APPEND PANTHEIOS_LIBRARIES
  386. debug ${PANTHEIOS_${_P_FE}_${_P_LT}_DEBUG_LIBRARY}
  387. optimized ${PANTHEIOS_${_P_FE}_${_P_LT}_LIBRARY}
  388. )
  389. endif()
  390. # copy to NAME_LIBS
  391. set(PANTHEIOS_LIBS ${PANTHEIOS_LIBRARIES})
  392. # handle the QUIETLY and REQUIRED arguments and set Pantheios_FOUND to TRUE if
  393. # all listed variables are TRUE
  394. include(FindPackageHandleStandardArgs)
  395. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pantheios
  396. REQUIRED_VARS PANTHEIOS_INCLUDE_DIR ${_P_REQUIRED_LIBVARS}
  397. )
  398. mark_as_advanced(PANTHEIOS_INCLUDE_DIR PANTHEIOS_LIBRARIES)