Update copyright headers to 2021. (#6081)
[cvc5.git] / cmake / FindABC.cmake
1 #####################
2 ## FindABC.cmake
3 ## Top contributors (to current version):
4 ## Mathias Preiner
5 ## This file is part of the CVC4 project.
6 ## Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
7 ## in the top-level source directory and their institutional affiliations.
8 ## All rights reserved. See the file COPYING in the top-level source
9 ## directory for licensing information.
10 ##
11 # Find ABC
12 # ABC_FOUND - system has ABC lib
13 # ABC_INCLUDE_DIR - the ABC include directory
14 # ABC_LIBRARIES - Libraries needed to use ABC
15 # ABC_ARCH_FLAGS - Platform specific compile flags
16
17 # Note: contrib/get-abc copies header files to deps/install/include/abc.
18 # However, includes in ABC headers are not prefixed with "abc/" and therefore
19 # we have to look for headers in include/abc instead of include/.
20 find_path(ABC_INCLUDE_DIR NAMES base/abc/abc.h PATH_SUFFIXES abc)
21 find_library(ABC_LIBRARIES NAMES abc)
22 find_program(ABC_ARCH_FLAGS_PROG NAMES arch_flags)
23
24 if(ABC_ARCH_FLAGS_PROG)
25 execute_process(COMMAND ${ABC_ARCH_FLAGS_PROG}
26 OUTPUT_VARIABLE ABC_ARCH_FLAGS)
27 endif()
28
29 include(FindPackageHandleStandardArgs)
30 find_package_handle_standard_args(ABC
31 DEFAULT_MSG
32 ABC_INCLUDE_DIR ABC_LIBRARIES ABC_ARCH_FLAGS)
33
34 mark_as_advanced(ABC_INCLUDE_DIR ABC_LIBRARIES ABC_ARCH_FLAGS)
35 if(ABC_LIBRARIES)
36 message(STATUS "Found ABC libs: ${ABC_LIBRARIES}")
37 endif()