mirror of
https://github.com/eclipse/upm.git
synced 2025-07-08 12:51:18 +03:00
JAVA: Remove library source compile from JAVA packages
Previously the JAVA packages re-compile UPM library source files. This was a work-around for compiling JAVA-specific functionality from the UPM source into the SWIG'ed JAVA pacakges. This commit removes the source from the JAVA SWIG compile and provides an example on how to add the JAVA-specific code with a swig extend call. * Added _upm.i file for %import (not %include) * Added macros to _upm.i; 1 which performs the loadLibrary, and one which adds the java installISR runnable. * Updated the src/CMakeLists.txt file to NOT build library src into pacakges. * Updated the a110x library with examples on how to use the macros. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -437,16 +437,10 @@ function(upm_swig_java)
|
||||
|
||||
set_source_files_properties (javaupm_${libname}.i PROPERTIES CPLUSPLUS ON)
|
||||
set_source_files_properties (javaupm_${libname}.i PROPERTIES SWIG_FLAGS ";-package;upm_${libname};-I${CMAKE_BINARY_DIR}/src")
|
||||
# NOTE, ${module_src} is ONLY needed when swig'ing to JAVA. This is
|
||||
# because *some* upm libraries have ifdef's for JAVA and SWIG in their
|
||||
# source (cxx) which builds in different functionality. Because of this,
|
||||
# the source must be added when building the JAVA wrapper.
|
||||
# See issue #518
|
||||
# TODO: Fix this somehow
|
||||
if (CMAKE_VERSION VERSION_LESS "3.8")
|
||||
swig_add_module (javaupm_${libname} java javaupm_${libname}.i ${module_src})
|
||||
swig_add_module (javaupm_${libname} java javaupm_${libname}.i)
|
||||
else ()
|
||||
swig_add_library (javaupm_${libname} LANGUAGE java SOURCES javaupm_${libname}.i ${module_src})
|
||||
swig_add_library (javaupm_${libname} LANGUAGE java SOURCES javaupm_${libname}.i)
|
||||
endif ()
|
||||
|
||||
# If the C++ target depends on C++ interfaces, make the JAVA target
|
||||
|
Reference in New Issue
Block a user