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

136 lines
2.7 KiB
CMake
Raw Normal View History

2016-04-05 02:22:49 +01:00
# - Try to find the CUDD BDD package
# Once done this will define
2016-03-30 17:35:03 +01:00
#
2016-04-05 02:22:49 +01:00
# CUDD_FOUND - system has CUDD
# CUDD_LIBRARIES - Link these to use CUDD
# CUDD_INCLUDE_DIR - Include directory for using CUDD
2016-03-30 17:35:03 +01:00
#
2016-04-05 02:22:49 +01:00
# Based on FindFontconfig Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
2016-03-30 17:35:03 +01:00
#
2016-04-05 02:22:49 +01:00
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
2016-04-15 11:32:22 +01:00
if (NOT DEFINED CUDD_ROOT)
set(CUDD_ROOT $ENV{CUDD_ROOT})
2016-03-30 17:35:03 +01:00
endif()
2016-04-05 02:22:49 +01:00
# Check if we have cached results in case the last round was successful.
find_package(PkgConfig)
find_path(CUDD_INCLUDE_DIR
NAMES cudd.h cudd/cudd.h
$ENV{CUDD_ROOT}/include
$ENV{CUDD_ROOT}
/usr/local/yap/include
/usr/local/Yap/include
2016-04-14 11:58:35 +01:00
/usr/local/cudd/include
/usr/lib/cudd/include
2016-04-05 02:22:49 +01:00
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include/
/sw/include # Fink
/opt/local/include # MacPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
NO_DEFAULT_PATHS
)
2016-04-14 11:58:35 +01:00
2016-05-30 11:23:36 +01:00
mark_as_advanced(CUDD_INCLUDE_DIR)
2016-04-05 02:22:49 +01:00
2016-04-14 11:58:35 +01:00
if (${CUDD_ROOT})
2016-04-05 02:22:49 +01:00
set (CUDD_LIB_SEARCH_PATH
2016-06-05 00:01:23 +01:00
$ENV{CUDD_ROOT}/lib
$ENV{CUDD_ROOT}/lib64
$ENV{CUDD_ROOT}/lib-dbg
$ENV{CUDD_ROOT}
${CUDD_ROOT}/cudd
/usr/lib
2016-04-05 02:22:49 +01:00
${CUDD_ROOT}/lib
${CUDD_ROOT}/lib64
${CUDD_ROOT}/lib-dbg
${CUDD_ROOT}
${CUDD_ROOT}/cudd
)
endif()
2016-04-14 11:58:35 +01:00
2016-06-05 00:01:23 +01:00
mark_as_advanced(CUDD_LIB_SEARCH_PATH on)
2016-05-30 11:23:36 +01:00
2016-04-14 11:58:35 +01:00
2016-04-05 02:22:49 +01:00
set (CUDD_LIB_SEARCH_PATH
${CUDD_LIB_SEARCH_PATH}
2016-06-05 00:01:23 +01:00
/usr/lib64
/usr/lib
/usr/local/lib/cudd
2016-04-14 11:58:35 +01:00
/usr/local/cudd/lib
2016-04-05 02:22:49 +01:00
/usr/lib/cudd
2016-04-14 11:58:35 +01:00
/usr/lib/cudd/lib
2016-05-30 11:23:36 +01:00
/usr/lib64/cudds
2016-04-05 02:22:49 +01:00
/usr/freeware/lib64 )
2016-04-14 11:58:35 +01:00
find_library(CUDD_LIBRARIES
2016-04-05 02:22:49 +01:00
NAMES cudd
PATHS
${CUDD_LIB_SEARCH_PATH}
)
2016-04-14 11:58:35 +01:00
IF (NOT EXISTS ${CUDD_INCLUDE_DIR}/epdInt.h )
find_library(CUDD_DDDMP_LIBRARY
NAMES dddmp
2016-04-05 02:22:49 +01:00
PATHS
${CUDD_LIB_SEARCH_PATH}
)
2016-04-14 11:58:35 +01:00
2016-04-05 02:22:49 +01:00
find_library(CUDD_EPD_LIBRARY
NAMES epd
PATHS
${CUDD_LIB_SEARCH_PATH}
)
find_library(CUDD_ST_LIBRARY
NAMES cuddst st
PATHS
${CUDD_LIB_SEARCH_PATH}
)
find_library(CUDD_UTIL_LIBRARY
2016-06-05 00:01:23 +01:00
NAMES cuddutil util
2016-04-05 02:22:49 +01:00
PATHS
${CUDD_LIB_SEARCH_PATH}
NO_DEFAULT_PATHS
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH
)
find_library(CUDD_MTR_LIBRARY
NAMES mtr
PATHS
${CUDD_LIB_SEARCH_PATH}
)
2016-03-30 17:35:03 +01:00
2016-05-30 11:23:36 +01:00
set(CUDD_LIBRARIES
2016-04-14 11:58:35 +01:00
${CUDD_LIBRARIES} ${CUDD_ST_LIBRARY} ${CUDD_UTIL_LIBRARY}
2016-05-30 11:23:36 +01:00
${CUDD_MTR_LIBRARY} ${CUDD_EPD_LIBRARY} ${CUDD_DDDMP_LIBRARY} )
2016-03-30 17:35:03 +01:00
2016-04-15 11:32:22 +01:00
endif () # Check for cudd 2.
2016-03-30 17:35:03 +01:00
2016-04-18 16:41:30 +01:00
SET( CUDD_FOUND "NO" )
IF(CUDD_INCLUDE_DIR AND CUDD_LIBRARIES)
SET( CUDD_FOUND "YES" )
ENDIF()
2016-04-05 02:22:49 +01:00
mark_as_advanced (CUDD_FOUND)
2016-04-15 11:32:22 +01:00
2016-04-18 16:41:30 +01:00
2016-04-15 11:32:22 +01:00
find_package_handle_standard_args(R DEFAULT_MSG CUDD_LIBRARIES CUDD_INCLUDE_DIR )