summaryrefslogtreecommitdiff
path: root/cmake/FindPoly.cmake
blob: 5f4383732d60f74752a041607e97bce3000c6843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Find LibPoly
# POLY_FOUND - system has LibPoly
# POLY_INCLUDE_DIR - the LibPoly include directory
# POLY_LIBRARIES - Libraries needed to use LibPoly

# Note: contrib/get-poly copies header files to deps/install/include/poly.
# However, includes in LibPoly headers are not prefixed with "poly/" and therefore
# we have to look for headers in include/poly instead of include/.
find_path(POLY_INCLUDE_DIR NAMES poly/poly.h PATH_SUFFIXES poly)
find_library(POLY_LIB NAMES poly)
find_library(POLY_LIBXX NAMES polyxx)
set(POLY_LIBRARIES "${POLY_LIBXX};${POLY_LIB}")
unset(POLY_LIB CACHE)
unset(POLY_LIBXX CACHE)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Poly
  DEFAULT_MSG
  POLY_INCLUDE_DIR POLY_LIBRARIES)

mark_as_advanced(POLY_INCLUDE_DIR POLY_LIBRARIES)
if(POLY_LIBRARIES)
  message(STATUS "Found LibPoly: ${POLY_LIBRARIES}")
endif()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback