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/packages/bdd/CMakeLists.txt

77 lines
1.9 KiB
CMake
Raw Normal View History

2015-04-20 01:21:19 +01:00
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
PROJECT ( YAP_BDD C )
SET ( YAP_BDD_VERSION 0.1)
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
2015-04-21 23:12:18 +01:00
SET( CMAKE_FIND_FRAMEWORK LAST)
SET( CMAKE_FIND_APPBUNDLE LAST)
2015-04-20 01:21:19 +01:00
if (NOT YAP_FOUND)
FIND_PACKAGE(YAP REQUIRED)
ENDIF (NOT YAP_FOUND)
IF (NOT YAP_FOUND)
MESSAGE (SEND_ERROR "YAP was not found!")
ENDIF (NOT YAP_FOUND)
macro_optional_find_package (CUDD ON)
macro_log_feature (CUDD_FOUND "CUDD"
"Use CUDD Library"
2015-06-19 01:20:49 +01:00
"http://vlsi.colorado.edu/~fabio/CUDD/" FALSE)
2015-04-20 01:21:19 +01:00
IF (CUDD_FOUND)
# CUDD_FOUND - system has Cudd
# CUDD_LIBRARIES - Link these to use Cudd
# CUDD_INCLUDE_DIR - Include directory for using Cudd
2015-06-19 01:20:49 +01:00
SET ( BDD_SOURCES
cudd.c
)
ADD_LIBRARY(cudd SHARED ${BDD_SOURCES} )
2015-04-20 01:21:19 +01:00
INCLUDE_DIRECTORIES(
${CUDD_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
2015-06-19 01:20:49 +01:00
check_include_files( util.h HAVE_UTIL_H )
check_include_files( cudd/util.h HAVE_CUDD_UTIL_H )
check_include_files( cudd.h HAVE_CUDD_H )
check_include_files( "stdio.h;cudd/cudd.h" HAVE_CUDD_CUDD_H )
check_include_files( cuddInt.h HAVE_CUDDINT_H )
check_include_files( "stdio.h;cudd/cudd.h;cudd/cuddInt.h" HAVE_CUDD_CUDDINT_H )
2015-04-21 23:12:18 +01:00
configure_file ("${PROJECT_SOURCE_DIR}/cudd_config.h.cmake"
2015-06-19 01:20:49 +01:00
"${CMAKE_CURRENT_BINARY_DIR}/cudd_config.h" )
2015-04-21 23:12:18 +01:00
2015-04-20 01:21:19 +01:00
2015-06-19 01:20:49 +01:00
if(DEFINED YAP_MAJOR_VERSION)
2015-04-20 01:21:19 +01:00
TARGET_LINK_LIBRARIES(cudd
2015-06-19 01:20:49 +01:00
${CUDD_LIBRARIES}
libYap
2015-04-20 01:21:19 +01:00
)
else()
TARGET_LINK_LIBRARIES(cudd
2015-06-19 01:20:49 +01:00
${CUDD_LIBRARIES}
${YAP_LIBRARY}
2015-04-20 01:21:19 +01:00
)
endif()
2015-06-19 01:20:49 +01:00
2015-04-20 01:21:19 +01:00
set_target_properties (cudd PROPERTIES PREFIX "")
2015-06-19 01:20:49 +01:00
add_subdirectory(simplecudd)
add_subdirectory(simplecudd_lfi)
2015-04-20 01:21:19 +01:00
install(TARGETS cudd
LIBRARY DESTINATION ${dlls}
)
INSTALL(FILES bdd.yap DESTINATION ${libpl})
2015-06-19 01:20:49 +01:00
INSTALL(FILES ddnnf.yap DESTINATION ${libpl})
INSTALL(FILES simpbool.yap DESTINATION ${libpl})
INSTALL(FILES trie_sp.yap DESTINATION ${libpl})
2015-04-20 01:21:19 +01:00
ENDIF (CUDD_FOUND)