cmake work
This commit is contained in:
parent
e043e7595e
commit
3b4226bda1
@ -6,6 +6,8 @@ SET ( YAP_BDD_VERSION 0.1)
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||
|
||||
SET( CMAKE_FIND_FRAMEWORK LAST)
|
||||
SET( CMAKE_FIND_APPBUNDLE LAST)
|
||||
|
||||
if (NOT YAP_FOUND)
|
||||
FIND_PACKAGE(YAP REQUIRED)
|
||||
@ -30,6 +32,16 @@ IF (CUDD_FOUND)
|
||||
.
|
||||
)
|
||||
|
||||
check_include_file( util.h HAVE_UTIL_H )
|
||||
check_include_file( cudd/util.h HAVE_CUDD_UTIL_H )
|
||||
check_include_file( cudd.h HAVE_CUDD_H )
|
||||
check_include_file( cudd/cudd.h HAVE_CUDD_CUDD_H )
|
||||
check_include_file( cuddInt.h HAVE_CUDDINT_H )
|
||||
check_include_file( cudd/cuddInt.h HAVE_CUDD_CUDDINT_H )
|
||||
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/cudd_config.h.cmake"
|
||||
"${PROJECT_BINARY_DIR}/cudd_config.h" )
|
||||
|
||||
SET ( BDD_SOURCES
|
||||
cudd.c
|
||||
)
|
||||
|
@ -42,9 +42,14 @@ if ( NOT( CUDD_INCLUDE_DIR AND CUDD_LIBRARIES ) OR NOT CUDD_FOUND )
|
||||
/opt/csw/include # Blastwave
|
||||
/opt/include
|
||||
/usr/freeware/include
|
||||
NO_DEFAULT_PATHS
|
||||
|
||||
)
|
||||
|
||||
find_path(CUDD_INCLUDE_DIR
|
||||
NAMES cudd.h
|
||||
)
|
||||
|
||||
find_library(CUDD_INTERFACE_LIBRARY
|
||||
NAMES cudd
|
||||
PATHS
|
||||
|
@ -113,6 +113,7 @@ mkdir -p packages/bdd
|
||||
|
||||
if test "$PKG_BDDLIB" != ""; then
|
||||
AC_CONFIG_FILES([packages/bdd/Makefile])
|
||||
AC_CONFIG_FILES([packages/bdd/Makefile/config.h])
|
||||
AC_CONFIG_FILES([packages/ProbLog/simplecudd/Makefile])
|
||||
AC_CONFIG_FILES([packages/ProbLog/simplecudd_lfi/Makefile])
|
||||
fi
|
||||
|
@ -38,6 +38,7 @@ CUDD will generate better/faster code.
|
||||
#include <stdio.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "cudd_config.h"
|
||||
#include "YapInterface.h"
|
||||
|
||||
#if HAVE_UTIL_H
|
||||
|
@ -1,3 +1,5 @@
|
||||
SET( CMAKE_FIND_FRAMEWORK LAST)
|
||||
SET( CMAKE_FIND_APPBUNDLE LAST)
|
||||
|
||||
set( MYDDAS_SOURCES
|
||||
myddas_mysql.c
|
||||
@ -79,9 +81,12 @@ if (ODBC_FOUND OR MYSQL_FOUND OR SQLITE3_FOUND OR PostgreSQL_FOUND)
|
||||
# SQLITE3_INCLUDE_DIRS - the Sqlite3 include directory
|
||||
# SQLITE3_LIBRARIES - Link these to use Sqlite3
|
||||
# SQLITE3_DEFINITIONS - Compiler switches required for using Sqlite3
|
||||
add_definitions (-DMYDDAS_SQLITE3=1)
|
||||
target_link_libraries(myddas ${SQLITE3_LIBRARIES})
|
||||
include_directories (${SQLITE3_INCLUDE_DIRS})
|
||||
check_function_exists( sqlite3_table_column_metadata HAVE_SQLITE3_TABLE_COLUMN_METADATA )
|
||||
if (HAVE_SQLITE3_TABLE_COLUMN_METADATA:INTERNAL=1)
|
||||
add_definitions (-DMYDDAS_SQLITE3=1)
|
||||
target_link_libraries(myddas ${SQLITE3_LIBRARIES})
|
||||
include_directories (${SQLITE3_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif (SQLITE3_FOUND)
|
||||
|
||||
if (MYSQL_FOUND)
|
||||
|
Reference in New Issue
Block a user