Android support
This commit is contained in:
@@ -62,19 +62,17 @@ set (LIBRARY_PL
|
||||
block_diagram.yap
|
||||
)
|
||||
|
||||
add_subdirectory(clp)
|
||||
add_subdirectory(dialect)
|
||||
add_subdirectory(matlab)
|
||||
add_subdirectory(matrix)
|
||||
add_subdirectory(random)
|
||||
add_subdirectory(regex)
|
||||
add_subdirectory(rltree)
|
||||
add_subdirectory(system)
|
||||
add_subdirectory(tries)
|
||||
add_subdirectory(ytest)
|
||||
|
||||
add_custom_target (library SOURCES ${LIBRARY_PL} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
|
||||
MY_add_subdirectory(dialect)
|
||||
MY_add_subdirectory(clp)
|
||||
MY_add_subdirectory(matlab)
|
||||
MY_add_subdirectory(matrix)
|
||||
MY_add_subdirectory(random)
|
||||
MY_add_subdirectory(regex)
|
||||
MY_add_subdirectory(rltree)
|
||||
MY_add_subdirectory(system)
|
||||
MY_add_subdirectory(tries)
|
||||
MY_add_subdirectory(ytest)
|
||||
MY_add_custom_target (library SOURCES ${LIBRARY_PL} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
|
||||
install(FILES ${LIBRARY_PL}
|
||||
DESTINATION ${libpl}
|
||||
|
@@ -5,8 +5,6 @@ set (DIALECTS_PL
|
||||
swi.yap
|
||||
)
|
||||
|
||||
add_subdirectory(swi)
|
||||
|
||||
add_custom_target( dialects
|
||||
DEPENDS visited
|
||||
SOURCES ${DIALECTS_PL} )
|
||||
|
@@ -1,13 +1,12 @@
|
||||
|
||||
set (LIBSWI_SOURCES
|
||||
swi.c blobs.c)
|
||||
swi.c blobs.c )
|
||||
|
||||
set (POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
add_library (libswi OBJECT
|
||||
add_component (libswi
|
||||
${LIBSWI_SOURCES})
|
||||
|
||||
set_target_properties(libswi
|
||||
|
||||
MY_set_target_properties(libswi
|
||||
PROPERTIES
|
||||
# RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION}
|
||||
# SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION}
|
||||
@@ -16,11 +15,7 @@ set_target_properties(libswi
|
||||
|
||||
include_directories (../../../H ../.../../include ../os ${CMAKE_BINARY_DIR} ${GMP_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries( libYap)
|
||||
|
||||
set (YAP_SWILIB $<TARGET_FILE_NAME:libswi> )
|
||||
|
||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${GMP_INCLUDE_DIR} )
|
||||
#set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GMP_LIBRARIES} )
|
||||
|
||||
|
||||
|
@@ -51,7 +51,7 @@ add_subdirectory (libtai)
|
||||
# ugh
|
||||
set (POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
add_library (libswi_os SHARED
|
||||
add_component (libswi_os
|
||||
${LIBSWI_OS_SOURCES}
|
||||
$<TARGET_OBJECTS:libyaptai>
|
||||
)
|
||||
|
@@ -1,11 +1,14 @@
|
||||
|
||||
add_library (yap_random SHARED yap_random.c)
|
||||
|
||||
set( LIBRANDOM_SOURCES yap_random.c)
|
||||
add_external (yap_random ${LIBRANDOM_SOURCES})
|
||||
if (ANDROID)
|
||||
else()
|
||||
|
||||
target_link_libraries(yap_random libYap)
|
||||
|
||||
set_target_properties (yap_random PROPERTIES PREFIX "")
|
||||
endif()
|
||||
|
||||
install(TARGETS yap_random
|
||||
MY_install(TARGETS yap_random
|
||||
LIBRARY DESTINATION ${dlls}
|
||||
ARCHIVE DESTINATION ${dlls} )
|
||||
|
||||
|
@@ -1,6 +1,14 @@
|
||||
set( LIBSYSTEM_SOURCES sys.c crypto/md5.c )
|
||||
set( LIBSYSTEM_HEADERS crypto/md5.h)
|
||||
|
||||
|
||||
add_library (sys SHARED sys.c crypto/md5.c crypto/md5.h)
|
||||
add_external (sys ${LIBSYSTEM_SOURCES})
|
||||
if (ANDROID)
|
||||
set (TARGET libYap)
|
||||
else()
|
||||
set (TARGET sys)
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# this will support getting better cryptographic support,
|
||||
@@ -13,26 +21,24 @@ find_package (OpenSSL)
|
||||
"https://www.openssl.org/")
|
||||
if (OPENSSL_FOUND)
|
||||
include_directories (${OPENSSL_INCLUDE_DIR})
|
||||
target_link_libraries(sys ${OPENSSL_LIBRARIES})
|
||||
target_link_libraries(${TARGET} ${OPENSSL_LIBRARIES})
|
||||
check_include_file( "openssl/ripemd.h" HAVE_OPENSSL_RIPEMD_H )
|
||||
check_include_file( "openssl/md5.h" HAVE_OPENSSL_MD5_H )
|
||||
endif (OPENSSL_FOUND)
|
||||
|
||||
check_library_exists( crypt crypt "" HAVE_LIBCRYPT )
|
||||
if (HAVE_LIBCRYPT)
|
||||
target_link_libraries(sys crypt)
|
||||
target_link_libraries(${TARGET} crypt)
|
||||
endif (HAVE_LIBCRYPT)
|
||||
|
||||
target_link_libraries(sys libYap)
|
||||
if (ANDROID)
|
||||
target_link_libraries(sys android gmp)
|
||||
MY_target_link_libraries(sys libYap)
|
||||
|
||||
if (NOT ANDROID)
|
||||
set_target_properties (sys PROPERTIES PREFIX "")
|
||||
endif()
|
||||
|
||||
set_target_properties (sys PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS sys
|
||||
MY_install(TARGETS sys
|
||||
LIBRARY DESTINATION ${dlls}
|
||||
ARCHIVE DESTINATION ${dlls} )
|
||||
|
||||
configure_file ("sys_config.h.cmake" "sys_config.h" )
|
||||
|
||||
|
Reference in New Issue
Block a user