android support

This commit is contained in:
Vitor Santos Costa 2016-06-02 11:52:22 +01:00
parent dce28a774e
commit e441f30c4c

View File

@ -115,14 +115,13 @@ endif()
get_git_head_revision(GIT_HEAD GIT_SHA1) get_git_head_revision(GIT_HEAD GIT_SHA1)
git_describe(GIT_DESCRIBE) git_describe(GIT_DESCRIBE)
if (ANDROID) if (ANDROID)
set (GMP_ROOT "${CMAKE_SOURCE_DIR}/../gmp/${ANDROID_ABI}") set (GMP_ROOT "${CMAKE_SOURCE_DIR}/../gmp/${ANDROID_ABI}")
else() else()
set(YAP_STARTUP startup.yss) set(YAP_STARTUP startup.yss)
endif()
option (WITH_CUDD "BDD CUDD package" ON)
option (WITH_CUDD "BDD CUDD package" NOT ${WITH_ANDROID})
if (WITH_CUDD) if (WITH_CUDD)
#detect cudd setup, as it is shared between different installations. #detect cudd setup, as it is shared between different installations.
@ -230,6 +229,9 @@ find_package(PythonLibs)
endif() endif()
endif(ANDROID)
if ( if (
) )
cmake_policy( SET CMP0042 NEW) cmake_policy( SET CMP0042 NEW)
@ -572,19 +574,6 @@ if (WITH_JIT)
add_subDIRECTORY(JIT) add_subDIRECTORY(JIT)
endif (WITH_JIT) endif (WITH_JIT)
add_subDIRECTORY (packages/gecode)
add_subDIRECTORY (packages/real)
add_subDIRECTORY (packages/python)
add_subDIRECTORY (packages/jpl)
add_subDIRECTORY (packages/bdd)
add_subDIRECTORY (packages/ProbLog)
add_subDIRECTORY (packages/swi-minisat2)
add_subDIRECTORY (packages/raptor) add_subDIRECTORY (packages/raptor)
@ -627,6 +616,20 @@ option (WITH_DOCS
# add_subDIRECTORY (packages/cuda) # add_subDIRECTORY (packages/cuda)
add_subDIRECTORY (packages/gecode)
add_subDIRECTORY (packages/real)
add_subDIRECTORY (packages/python)
add_subDIRECTORY (packages/jpl)
add_subDIRECTORY (packages/bdd)
add_subDIRECTORY (packages/ProbLog)
add_subDIRECTORY (packages/swi-minisat2)
#todo: use cmake target builds #todo: use cmake target builds
# option (USE_MAXPERFORMANCE # option (USE_MAXPERFORMANCE
# "try using the best flags for specific architecture" OFF) # "try using the best flags for specific architecture" OFF)
@ -665,7 +668,6 @@ CMAKE_DEPENDENT_OPTION (WITH_DL_MALLOC
CMAKE_DEPENDENT_OPTION (WITH_YAP_MALLOC CMAKE_DEPENDENT_OPTION (WITH_YAP_MALLOC
"use malloc to allocate memory" ON "NOT WITH_SYSTEM_MALLOC;NOT WITH_DL_MALLOC" OFF) "use malloc to allocate memory" ON "NOT WITH_SYSTEM_MALLOC;NOT WITH_DL_MALLOC" OFF)
option(WITH_YAP_CONDOR option(WITH_YAP_CONDOR
"allow YAP to be used from condor" OFF) "allow YAP to be used from condor" OFF)
@ -685,6 +687,7 @@ endif()
# "use dlcompat library for dynamic loading on Mac OS X" OFF) # "use dlcompat library for dynamic loading on Mac OS X" OFF)
# SHARED PACKAGES with SWI # SHARED PACKAGES with SWI
# swi packages have both Makefile.in which we will use and # swi packages have both Makefile.in which we will use and
# Makefile.mak, we will use the later to identify this packages # Makefile.mak, we will use the later to identify this packages
# while we keep both autotools amd cmake working side by side # while we keep both autotools amd cmake working side by side
@ -711,14 +714,13 @@ if(WIN32)
endif(WIN32) endif(WIN32)
if (NOT ANDROID) add_executable (yap-bin ${CONSOLE_SOURCES})
add_executable (yap-bin ${CONSOLE_SOURCES} yap)
set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap) if (ANDROID)
else()
add_executable (yap-bin ${CONSOLE_SOURCES} yap)
set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yapi) set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yapi)
else()
set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap)
endif() endif()
@ -778,8 +780,8 @@ configure_file ("${PROJECT_SOURCE_DIR}/config.h.cmake"
if (ANDROID) if (ANDROID)
INSTALL(FILES DESTINATION ${libdir} TYPE SHARED_LIBRARY FILES INSTALL(FILES ${GMP_LIBRARIES} DESTINATION ${libdir}
${GMP_LIBRARIES} ) )
endif(ANDROID) endif(ANDROID)
install(TARGETS libYap yap-bin install(TARGETS libYap yap-bin