This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/swig/android/CMakeLists.txt

43 lines
1.7 KiB
CMake
Raw Normal View History

2016-04-05 23:56:25 +01:00
2018-12-07 16:22:17 +00:00
# This is a CMake file for SWIG and Android
2019-01-09 09:32:09 +00:00
set(GENERATED_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../yaplib/src/generated)
set(JAVA_SWIG_OUTDIR ${GENERATED_SOURCE_DIR}/java/pt/up/yap/lib)
2018-12-07 16:22:17 +00:00
set(SWIG_SOURCES ${CMAKE_SOURCE_DIR}/packages/swig/yap.i)
SET_SOURCE_FILES_PROPERTIES(${SWIG_SOURCES} PROPERTIES CPLUSPLUS ON)
2019-01-09 09:32:09 +00:00
FILE( MAKE_DIRECTORY ${GENERATED_SOURCE_DIR}/assets/Yap/pl)
FILE( MAKE_DIRECTORY ${GENERATED_SOURCE_DIR}/assets/os)
2018-12-07 16:22:17 +00:00
2019-01-09 09:32:09 +00:00
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/CXX
${CMAKE_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/H
${CMAKE_SOURCE_DIR}/os
${CMAKE_SOURCE_DIR}/OPTYap
2018-12-07 16:22:17 +00:00
)
2019-01-09 09:32:09 +00:00
add_custom_command( OUTPUT yapi_swig.cxx yapi_swig.hh
COMMAND swig -c++ -java -package pt.up.yap.lib -O -outdir ${JAVA_SWIG_OUTDIR}
-addextern -I${CMAKE_SOURCE_DIR}/CXX -I${CMAKE_SOURCE_DIR}/include
-I${CMAKE_SOURCE_DIR}/H -I${CMAKE_SOURCE_DIR}/os -I${CMAKE_SOURCE_DIR}/OPTYap
-I${CMAKE_BINARY_DIR}
-I${GMP_INCLUDE_DIRS} -DX_API -o yapi_swig.cxx ${SWIG_SOURCES}
DEPENDS ${CMAKE_SOURCE_DIR}/CXX/yapi.hh ${SWIG_SOURCES}
)
add_custom_command( OUTPUT streamer_swig.cxx streamer_swig.hh
COMMAND swig -c++ -java -package pt.up.yap.lib -O -outdir ${JAVA_SWIG_OUTDIR} -addextern -I${CMAKE_CURRENT_SOURCE_DIR} -o streamer_swig.cxx streamer.i
DEPENDS ${CMAKE_SOURCE_DIR}/CXX/yapi.hh ${CMAKE_CURRENT_SOURCE_DIR}/streamer.i
)
add_library(DROID OBJECT
yapi_swig.cxx streamer_swig.cxx streamer.cpp
)