This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/cmake/FindCUDD.cmake

48 lines
1.5 KiB
CMake
Raw Normal View History

2017-01-09 15:00:03 +00:00
# Try to find CUDD headers and libraries.
2016-03-30 17:35:03 +01:00
#
2017-01-09 15:00:03 +00:00
# Usage of this module as follows:
2016-03-30 17:35:03 +01:00
#
2017-01-09 15:00:03 +00:00
# find_package(CUDD)
2016-03-30 17:35:03 +01:00
#
2017-01-09 15:00:03 +00:00
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# CUDD_ROOT Set this variable to the root installation of
# libcudd if the module has problems finding the
# proper installation path.
#
# Variables defined by this module:
#
# CUDD_FOUND System has CUDD libraries and headers
# CUDD_LIBRARIES The CUDD library
# CUDD_INCLUDE_DIR The location of CUDD headers
2016-04-05 02:22:49 +01:00
2017-01-09 15:00:03 +00:00
# Get hint from environment variable (if any)
if(NOT CUDD_ROOT AND DEFINED ENV{CUDD_ROOT})
set(CUDD_ROOT "$ENV{CUDD_ROOT}" CACHE PATH "CUDD base directory location (optional, used for nonstandard installation paths)")
mark_as_advanced(CUDD_ROOT)
2016-08-23 17:15:07 +01:00
endif()
2016-03-30 17:35:03 +01:00
2017-01-09 15:00:03 +00:00
# Search path for nonstandard locations
if(CUDD_ROOT)
set(CUDD_INCLUDE_PATH PATHS "${CUDD_ROOT}/include" NO_DEFAULT_PATH)
set(CUDD_LIBRARY_PATH PATHS "${CUDD_ROOT}/lib" NO_DEFAULT_PATH)
2016-08-23 17:15:07 +01:00
endif()
2016-03-30 17:35:03 +01:00
2017-01-09 15:00:03 +00:00
# Search path for nonstandard locations
if(CUDD_ROOT_DIR)
set(CUDD_INCLUDE_PATH PATHS "${CUDD_ROOT_DIR}/include" NO_DEFAULT_PATH)
set(CUDD_LIBRARY_PATH PATHS "${CUDD_ROOT_DIR}/lib" NO_DEFAULT_PATH)
2016-08-23 17:15:07 +01:00
endif()
2017-01-09 15:00:03 +00:00
find_path(CUDD_INCLUDE_DIR NAMES cudd.h cudd/cudd.h HINTS ${CUDD_INCLUDE_PATH})
find_library(CUDD_LIBRARIES NAMES cudd CUDDVC-2.5.0 HINTS ${CUDD_LIBRARY_PATH})
2016-04-18 16:41:30 +01:00
2017-01-09 15:00:03 +00:00
include(FindPackageHandleStandardArgs)
2016-04-15 11:32:22 +01:00
2017-01-09 15:00:03 +00:00
find_package_handle_standard_args(CUDD DEFAULT_MSG CUDD_LIBRARIES CUDD_INCLUDE_DIR)
2016-04-18 16:41:30 +01:00
2017-01-09 15:00:03 +00:00
mark_as_advanced(CUDD_ROOT CUDD_LIBRARIES CUDD_INCLUDE_DIR)
2016-04-15 11:32:22 +01:00