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.

46 lines
1.4 KiB

  1. # - Try to find libz3
  2. # Once done this will define
  3. # LIBZ3_FOUND - System has libz3
  4. # LIBZ3_INCLUDE_DIRS - The libz3 include directories
  5. # LIBZ3_LIBRARIES - The libraries needed to use libz3
  6. # dependencies
  7. # -- TODO -- needed?
  8. # find include dir by searching for a concrete file, which definetely must be in it
  9. find_path(Z3_INCLUDE_DIR
  10. NAMES src/util/z3_exception.h #exemplary file, should only be available in z3
  11. PATHS ENV PATH INCLUDE
  12. PATH_SUFFIXES z3
  13. )
  14. # find library
  15. find_library(Z3_LIBRARY
  16. NAMES z3
  17. PATHS /usr/local/include/z3/build ENV PATH INCLUDE
  18. )
  19. find_program(Z3_EXEC
  20. NAMES z3
  21. PATHS ENV PATH INCLUDE)
  22. # set up the final variables
  23. set(Z3_LIBRARIES ${Z3_LIBRARY})
  24. set(Z3_INCLUDE_DIRS ${Z3_INCLUDE_DIR}/src/util)
  25. set(Z3_SOLVER ${Z3_EXEC})
  26. # set the LIBZ3_FOUND variable by utilizing the following macro
  27. # (which also handles the REQUIRED and QUIET arguments)
  28. include(FindPackageHandleStandardArgs)
  29. find_package_handle_standard_args(z3 DEFAULT_MSG
  30. Z3_LIBRARY Z3_INCLUDE_DIR)
  31. IF (NOT Z3_FIND_QUIETLY)
  32. MESSAGE(STATUS "Found Z3: ${Z3_LIBRARY}")
  33. ENDIF (NOT Z3_FIND_QUIETLY)
  34. # debug output to see if everything went well
  35. #message(${Z3_INCLUDE_DIR})
  36. #message(${Z3_LIBRARY})
  37. # make the set variables only visible in advanced mode
  38. mark_as_advanced(Z3_LIBRARY Z3_INCLUDE_DIR Z3_SOLVER)