From e441f30c4c339b5b85ae77e461c23b96d7cc8db6 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Thu, 2 Jun 2016 11:52:22 +0100 Subject: [PATCH] android support --- CMakeLists.txt | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc23fa44c..455c2f7bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,14 +115,13 @@ endif() get_git_head_revision(GIT_HEAD GIT_SHA1) git_describe(GIT_DESCRIBE) + if (ANDROID) set (GMP_ROOT "${CMAKE_SOURCE_DIR}/../gmp/${ANDROID_ABI}") else() set(YAP_STARTUP startup.yss) -endif() - - option (WITH_CUDD "BDD CUDD package" NOT ${WITH_ANDROID}) + option (WITH_CUDD "BDD CUDD package" ON) if (WITH_CUDD) #detect cudd setup, as it is shared between different installations. @@ -230,6 +229,9 @@ find_package(PythonLibs) endif() + endif(ANDROID) + + if ( ) cmake_policy( SET CMP0042 NEW) @@ -572,19 +574,6 @@ if (WITH_JIT) add_subDIRECTORY(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) @@ -627,6 +616,20 @@ option (WITH_DOCS # 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 # option (USE_MAXPERFORMANCE # "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 "use malloc to allocate memory" ON "NOT WITH_SYSTEM_MALLOC;NOT WITH_DL_MALLOC" OFF) - option(WITH_YAP_CONDOR "allow YAP to be used from condor" OFF) @@ -685,6 +687,7 @@ endif() # "use dlcompat library for dynamic loading on Mac OS X" OFF) # SHARED PACKAGES with SWI + # swi packages have both Makefile.in which we will use and # Makefile.mak, we will use the later to identify this packages # while we keep both autotools amd cmake working side by side @@ -711,14 +714,13 @@ if(WIN32) endif(WIN32) -if (NOT ANDROID) -add_executable (yap-bin ${CONSOLE_SOURCES} yap) +add_executable (yap-bin ${CONSOLE_SOURCES}) -set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap) -else() -add_executable (yap-bin ${CONSOLE_SOURCES} yap) +if (ANDROID) set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yapi) +else() +set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap) endif() @@ -778,8 +780,8 @@ configure_file ("${PROJECT_SOURCE_DIR}/config.h.cmake" if (ANDROID) -INSTALL(FILES DESTINATION ${libdir} TYPE SHARED_LIBRARY FILES - ${GMP_LIBRARIES} ) +INSTALL(FILES ${GMP_LIBRARIES} DESTINATION ${libdir} + ) endif(ANDROID) install(TARGETS libYap yap-bin