Added bindings for iLight sensors.
Removed old interfaces C++ examples. Signed-off-by: Serban Waltter <serban.waltter@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
committed by
Mihai Tudor Panu
parent
c3d5d951e1
commit
2405f933de
@@ -254,9 +254,15 @@ function (_get_current_dot_i_file filePrefix varDotIFile)
|
||||
# And the SWIG import string
|
||||
string(REPLACE "#" "%" SWIG_PERCENT_INCLUDES "${SWIG_HASH_INCLUDES}")
|
||||
if(module_iface)
|
||||
foreach(_iface ${module_iface})
|
||||
set(SWIG_PERCENT_INCLUDES "%import \"interfaces/${_iface}\"")
|
||||
endforeach(_iface ${module_iface})
|
||||
# Set up Python bindings
|
||||
set(PYTHON_NEW_INTERFACES "#ifdef SWIGPYTHON\n")
|
||||
string(APPEND PYTHON_NEW_INTERFACES "%module (package=\"pyupm_new_interfaces\") ${libname}\n")
|
||||
string(APPEND PYTHON_NEW_INTERFACES "#endif")
|
||||
# Include interfaces
|
||||
set(IMPORT_NEW_INTERFACES "%import \"interfaces/new_interfaces.i\"")
|
||||
# Set up Java bindings
|
||||
string(APPEND JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\n")
|
||||
string(APPEND JAVA_TYPEMAPS "import upm_new_interfaces.*;\n%}")
|
||||
endif()
|
||||
# Write the interface file
|
||||
configure_file (${PROJECT_SOURCE_DIR}/src/swigme.i.in "${${varDotIFile}}" @ONLY)
|
||||
@@ -419,6 +425,11 @@ function(upm_swig_node)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
${DEPEND_DIRS})
|
||||
|
||||
# Include interface directory
|
||||
if (module_iface)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
endif()
|
||||
|
||||
# Decide between ${libname}.i or a language-specific .i
|
||||
_get_current_dot_i_file(jsupm SWIG_CURRENT_DOT_I_FILE)
|
||||
# If this module is using ${libname}.i, provide a module name for UseSWIG AND SWIG_FLAGS
|
||||
@@ -439,6 +450,12 @@ function(upm_swig_node)
|
||||
else ()
|
||||
swig_add_library (jsupm_${libname} LANGUAGE javascript SOURCES ${SWIG_CURRENT_DOT_I_FILE})
|
||||
endif ()
|
||||
|
||||
# Add interfaces if necessary
|
||||
if(module_iface)
|
||||
add_dependencies(jsupm_${libname} jsupm_new_interfaces)
|
||||
endif()
|
||||
|
||||
add_dependencies(jsupm_${libname} ${libname})
|
||||
swig_link_libraries (jsupm_${libname} ${NODE_LIBRARIES} ${libname})
|
||||
target_include_directories ( ${SWIG_MODULE_jsupm_${libname}_REAL_NAME}
|
||||
@@ -533,6 +550,7 @@ function(upm_swig_java)
|
||||
endif ()
|
||||
if(module_iface)
|
||||
add_dependencies(javaupm_${libname} javaupm_new_interfaces)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
set (NEW_INTERFACES_JAR_FILE ${CMAKE_BINARY_DIR}/interfaces/upm_new_interfaces.jar)
|
||||
endif()
|
||||
# For linker to report unresolved symbols. Note, there is currently no test
|
||||
|
||||
Reference in New Issue
Block a user