swig/android support

This commit is contained in:
Vitor Santos Costa 2016-09-21 14:42:26 -05:00
parent db2aa5b5f2
commit f35f0584eb
1 changed files with 3 additions and 4 deletions

View File

@ -69,8 +69,7 @@ if (ANDROID)
# #
set (SWIG_SOURCES ${CMAKE_SOURCE_DIR}/packages/swig/yap.i) set (SWIG_SOURCES ${CMAKE_SOURCE_DIR}/packages/swig/yap.i)
set (SWIG_CXX ${CMAKE_BINARY_DIR}/packages/swig/android/yap.cpp) set (SWIG_CXX ${CMAKE_BINARY_DIR}/yap_swig.cpp)
list (APPEND ENGINE_SOURCES ${SWIG_CXX})
find_host_package (SWIG) find_host_package (SWIG)
macro_log_feature (SWIG_FOUND "Swig" macro_log_feature (SWIG_FOUND "Swig"
"Use SWIG Language Interface " "Use SWIG Language Interface "
@ -78,7 +77,7 @@ macro_log_feature (SWIG_FOUND "Swig"
add_custom_command (OUTPUT ${SWIG_CXX} add_custom_command (OUTPUT ${SWIG_CXX}
COMMAND ${SWIG_EXECUTABLE} -java -package pt.up.yap.lib -outdir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/../../../../../generated/src/java -c++ -addextern -I${CMAKE_SOURCE_DIR}/CXX -o ${SWIG_CXX} COMMAND ${SWIG_EXECUTABLE} -c++ -java -package pt.up.yap.lib -outdir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/../../../../../src/generated/java -I${CMAKE_SOURCE_DIR}/CXX -o ${SWIG_CXX}
${SWIG_SOURCES} ${SWIG_SOURCES}
) )
@ -86,7 +85,6 @@ macro_log_feature (SWIG_FOUND "Swig"
ADD_SUBDIRECTORY(OPTYap) ADD_SUBDIRECTORY(OPTYap)
ADD_SUBDIRECTORY(packages/myddas) ADD_SUBDIRECTORY(packages/myddas)
ADD_SUBDIRECTORY(library/random) ADD_SUBDIRECTORY(library/random)
ADD_SUBDIRECTORY(packages/swig)
ADD_SUBDIRECTORY(library/system) ADD_SUBDIRECTORY(library/system)
ADD_SUBDIRECTORY(utf8proc) ADD_SUBDIRECTORY(utf8proc)
ADD_SUBDIRECTORY(CXX) ADD_SUBDIRECTORY(CXX)
@ -116,6 +114,7 @@ add_library( # Sets the name of the library.
SHARED SHARED
${ENGINE_SOURCES} ${ENGINE_SOURCES}
${SWIG_CXX}
${C_INTERFACE_SOURCES} ${C_INTERFACE_SOURCES}
${STATIC_SOURCES} ${STATIC_SOURCES}
${ALL_SOURCES} ${ALL_SOURCES}