|
|
@ -253,7 +253,11 @@ function (_get_current_dot_i_file filePrefix varDotIFile)
|
|
|
|
set(SWIG_HASH_INCLUDES "#include \"${SWIG_HASH_INCLUDES}\"")
|
|
|
|
set(SWIG_HASH_INCLUDES "#include \"${SWIG_HASH_INCLUDES}\"")
|
|
|
|
# And the SWIG import string
|
|
|
|
# And the SWIG import string
|
|
|
|
string(REPLACE "#" "%" SWIG_PERCENT_INCLUDES "${SWIG_HASH_INCLUDES}")
|
|
|
|
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})
|
|
|
|
|
|
|
|
endif()
|
|
|
|
# Write the interface file
|
|
|
|
# Write the interface file
|
|
|
|
configure_file (${PROJECT_SOURCE_DIR}/src/swigme.i.in "${${varDotIFile}}" @ONLY)
|
|
|
|
configure_file (${PROJECT_SOURCE_DIR}/src/swigme.i.in "${${varDotIFile}}" @ONLY)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
@ -271,7 +275,8 @@ macro(_upm_swig_python)
|
|
|
|
|
|
|
|
|
|
|
|
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/..
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/..
|
|
|
|
${DEPEND_DIRS})
|
|
|
|
${DEPEND_DIRS}
|
|
|
|
|
|
|
|
${UPM_COMMON_HEADER_DIRS})
|
|
|
|
|
|
|
|
|
|
|
|
# Decide between ${libname}.i or a language-specific .i
|
|
|
|
# Decide between ${libname}.i or a language-specific .i
|
|
|
|
_get_current_dot_i_file(pyupm SWIG_CURRENT_DOT_I_FILE)
|
|
|
|
_get_current_dot_i_file(pyupm SWIG_CURRENT_DOT_I_FILE)
|
|
|
@ -305,6 +310,11 @@ macro(_upm_swig_python)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
# Get target library name (example _pyupm_a110x-python2)
|
|
|
|
# Get target library name (example _pyupm_a110x-python2)
|
|
|
|
set (python_wrapper_target ${SWIG_MODULE_${python_wrapper_name}_REAL_NAME})
|
|
|
|
set (python_wrapper_target ${SWIG_MODULE_${python_wrapper_name}_REAL_NAME})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(module_iface)
|
|
|
|
|
|
|
|
add_dependencies(${python_wrapper_target} _pyupm_new_interfaces-python${PYTHON_VERSION_MAJOR})
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
add_dependencies(${python_wrapper_target} ${libname})
|
|
|
|
add_dependencies(${python_wrapper_target} ${libname})
|
|
|
|
|
|
|
|
|
|
|
|
swig_link_libraries (${python_wrapper_name} ${PYTHON_LIBRARIES} ${libname} -Wl,--unresolved-symbols=report-all)
|
|
|
|
swig_link_libraries (${python_wrapper_name} ${PYTHON_LIBRARIES} ${libname} -Wl,--unresolved-symbols=report-all)
|
|
|
@ -390,7 +400,7 @@ endfunction(upm_swig_python)
|
|
|
|
function(upm_swig_node)
|
|
|
|
function(upm_swig_node)
|
|
|
|
# Skip if the libname is in the blacklist
|
|
|
|
# Skip if the libname is in the blacklist
|
|
|
|
if (NOT ";${NODESWIG_BLACKLIST};" MATCHES ";${libname};")
|
|
|
|
if (NOT ";${NODESWIG_BLACKLIST};" MATCHES ";${libname};")
|
|
|
|
# SWIG treats SWIG_FLAGS as a list and not a string so semicolon seperation is
|
|
|
|
# SWIG treats SWIG_FLAGS as a list and not a string so semicolon seperation is
|
|
|
|
# required. This hardcodes V8_VERSION to be <10 but I assume that's not going
|
|
|
|
# required. This hardcodes V8_VERSION to be <10 but I assume that's not going
|
|
|
|
# to be a problem for a little while! SWIG uses a padded SWIG_V8 version which
|
|
|
|
# to be a problem for a little while! SWIG uses a padded SWIG_V8 version which
|
|
|
|
# we hack together from our findnode module.
|
|
|
|
# we hack together from our findnode module.
|
|
|
@ -866,7 +876,11 @@ function(upm_module_init)
|
|
|
|
# Install interface file if it exists
|
|
|
|
# Install interface file if it exists
|
|
|
|
if(DEFINED module_iface)
|
|
|
|
if(DEFINED module_iface)
|
|
|
|
set(iface_path ${PROJECT_SOURCE_DIR}/include/interfaces)
|
|
|
|
set(iface_path ${PROJECT_SOURCE_DIR}/include/interfaces)
|
|
|
|
install (FILES ${iface_path}/${module_iface}
|
|
|
|
set(iface_files "")
|
|
|
|
|
|
|
|
foreach(iface ${module_iface})
|
|
|
|
|
|
|
|
LIST(APPEND iface_files "${iface_path}/${iface}")
|
|
|
|
|
|
|
|
endforeach(iface ${module_iface})
|
|
|
|
|
|
|
|
install (FILES ${iface_files}
|
|
|
|
DESTINATION include/upm/interfaces
|
|
|
|
DESTINATION include/upm/interfaces
|
|
|
|
COMPONENT ${CMAKE_PROJECT_NAME}-dev)
|
|
|
|
COMPONENT ${CMAKE_PROJECT_NAME}-dev)
|
|
|
|
endif(DEFINED module_iface)
|
|
|
|
endif(DEFINED module_iface)
|
|
|
@ -941,6 +955,7 @@ foreach(subdir ${MODULE_LIST})
|
|
|
|
add_subdirectory(${subdir})
|
|
|
|
add_subdirectory(${subdir})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_subdirectory(${PROJECT_SOURCE_DIR}/include/interfaces ${CMAKE_BINARY_DIR}/interfaces)
|
|
|
|
|
|
|
|
|
|
|
|
# Print stats for all targets
|
|
|
|
# Print stats for all targets
|
|
|
|
_print_target_summary()
|
|
|
|
_print_target_summary()
|
|
|
|