2015-04-20 01:21:19 +01:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
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
|
|
|
|
2016-04-14 23:24:07 +01:00
|
|
|
SET ( BDD_SOURCES
|
2015-06-19 01:20:49 +01:00
|
|
|
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}
|
|
|
|
)
|
2016-01-03 02:06:09 +00:00
|
|
|
|
2016-04-14 23:24:07 +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}
|
2017-11-15 12:18:19 +00:00
|
|
|
m
|
2015-06-19 01:20:49 +01:00
|
|
|
libYap
|
2015-04-20 01:21:19 +01:00
|
|
|
)
|
|
|
|
else()
|
|
|
|
TARGET_LINK_LIBRARIES(cudd
|
2015-06-19 01:20:49 +01:00
|
|
|
${CUDD_LIBRARIES}
|
2017-11-15 12:18:19 +00:00
|
|
|
m
|
2015-06-19 01:20:49 +01:00
|
|
|
${YAP_LIBRARY}
|
2015-04-20 01:21:19 +01:00
|
|
|
)
|
|
|
|
endif()
|
2015-06-19 01:20:49 +01:00
|
|
|
|
2017-11-21 15:44:43 +00:00
|
|
|
add_subdirectory(simplecudd)
|
2015-06-19 01:20:49 +01:00
|
|
|
add_subdirectory(simplecudd_lfi)
|
2016-01-03 02:06:09 +00:00
|
|
|
set(YAP_SYSTEM_OPTIONS "cudd " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
2015-06-19 01:20:49 +01:00
|
|
|
|
2018-11-16 14:02:56 +00:00
|
|
|
INSTALL(FILES ${CMAKE_BINARY_DIR}/cudd_config.h DESTINATION ${YAP_INSTALL_INCLUDEDIR})
|
2018-02-23 14:07:21 +00:00
|
|
|
|
|
|
|
install(TARGETS cudd
|
2018-11-16 14:02:56 +00:00
|
|
|
LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR}
|
2016-01-20 22:36:52 +00:00
|
|
|
|
2015-04-20 01:21:19 +01:00
|
|
|
)
|
|
|
|
|
2018-11-16 14:02:56 +00:00
|
|
|
INSTALL(FILES bdd.yap DESTINATION ${YAP_INSTALL_DATADIR})
|
|
|
|
INSTALL(FILES ddnnf.yap DESTINATION ${YAP_INSTALL_DATADIR})
|
|
|
|
INSTALL(FILES simpbool.yap DESTINATION ${YAP_INSTALL_DATADIR})
|
|
|
|
INSTALL(FILES trie_sp.yap DESTINATION ${YAP_INSTALL_DATADIR})
|
2016-01-03 02:06:09 +00:00
|
|
|
|
2015-04-20 01:21:19 +01:00
|
|
|
ENDIF (CUDD_FOUND)
|