Add check for limit of number of node children (#3035)
[cvc5.git] / cmake / FindLFSC.cmake
1 # Find LFSC
2 # LFSC_FOUND - system has LFSC lib
3 # LFSC_INCLUDE_DIR - the LFSC include directory
4 # LFSC_LIBRARIES - Libraries needed to use LFSC
5
6
7 # Check default location of LFSC built with contrib/get-lfsc.
8 # If the user provides a directory we will not search the default paths and
9 # fail if LFSC was not found in the specified directory.
10 if(NOT LFSC_HOME)
11 set(LFSC_HOME ${PROJECT_SOURCE_DIR}/lfsc-checker/install)
12 set(CHECK_SYSTEM_VERSION TRUE)
13 endif()
14
15 find_path(LFSC_INCLUDE_DIR
16 NAMES lfscc.h
17 PATHS ${LFSC_HOME}/include
18 NO_DEFAULT_PATH)
19 find_library(LFSC_LIBRARIES
20 NAMES lfscc
21 PATHS ${LFSC_HOME}/lib
22 NO_DEFAULT_PATH)
23
24 if(CHECK_SYSTEM_VERSION)
25 find_path(LFSC_INCLUDE_DIR NAMES lfscc.h)
26 find_library(LFSC_LIBRARIES NAMES lfscc)
27 endif()
28
29 include(FindPackageHandleStandardArgs)
30 find_package_handle_standard_args(LFSC
31 DEFAULT_MSG
32 LFSC_INCLUDE_DIR LFSC_LIBRARIES)
33
34 mark_as_advanced(LFSC_INCLUDE_DIR LFSC_LIBRARIES)
35 if(LFSC_LIBRARIES)
36 message(STATUS "Found LFSC libs: ${LFSC_LIBRARIES}")
37 endif()