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.

43 lines
1.4 KiB

  1. # - Try to find libglpk
  2. # Once done this will define
  3. # CUDD_FOUND - System has cudd
  4. # CUDD_INCLUDE_DIR - The cudd include directory
  5. # CUDD_LIBRARIES - The libraries needed to use cudd
  6. # CUDD_VERSION_STRING - The version of cudd ("major.minor.release")
  7. # use pkg-config to get the directories and then use these values
  8. # in the find_path() and find_library() calls
  9. find_package(PkgConfig QUIET)
  10. PKG_CHECK_MODULES(PC_CUDD QUIET cudd)
  11. find_path(CUDD_INCLUDE_DIR NAMES cudd.h
  12. HINTS
  13. ${PC_CUDD_INCLUDEDIR}
  14. ${PC_CUDD_INCLUDE_DIRS}
  15. PATH_SUFFIXES cudd
  16. )
  17. find_library(CUDD_LIBRARIES NAMES cudd
  18. HINTS
  19. ${PC_CUDD_LIBDIR}
  20. ${PC_CUDD_LIBRARY_DIRS}
  21. )
  22. if(PC_CUDD_VERSION)
  23. set(CUDD_VERSION_STRING ${PC_CUDD_VERSION})
  24. elseif(CUDD_INCLUDE_DIR AND EXISTS "${CUDD_INCLUDE_DIR}/cudd.h")
  25. file(STRINGS "${CUDD_INCLUDE_DIR}/cudd.h" cudd_version
  26. REGEX "^#define[\t ]+CUDD_VERSION[\t ]+\".+\"")
  27. string(REGEX REPLACE "^#define[\t ]+CUDD_VERSION[\t ]+\"(.+)\"" "\\1"
  28. CUDD_VERSION_STRING "${cudd_version}")
  29. unset(cudd_version)
  30. endif()
  31. # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
  32. # all listed variables are TRUE
  33. include(FindPackageHandleStandardArgs)
  34. FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUDD
  35. REQUIRED_VARS CUDD_LIBRARIES CUDD_INCLUDE_DIR
  36. VERSION_VAR CUDD_VERSION_STRING)
  37. mark_as_advanced(CUDD_INCLUDE_DIR CUDD_LIBRARIES)