python: Build both python2 and python3 modules

Updated UPM cmake to build both python2/3 modules if the necessary
python libs are available.

    * Removed BUILDPYTHON3 cmake option in favor of building both
      versions
    * Added cmake module to find both python2 and python3
    * Added macro which can be called from per-sensor cmake files
      to add dependency libraries via target_link_libraries as well
      as swig_link_libraries (for java, nodejs, and python)
    * Python2 is required for python documentation builds
    * Cleanup of python usage throughout UPM cmakelists.
    * Make find_package for Node required.  Removed check for NODE_FOUND
      (which should have been NODEJS_FOUND) in favor of REQUIRED.
    * The cxx and .py wrapper files get generated in python2/3 (instead
      of the same directory).  It appears these files are identical,
      however since the targets can be built in parallel it's safer to split
      them out.
    * Updated all cmake dependencies related to building documentation.
    * Removed unused classname from cmake files

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2016-09-29 13:46:20 -07:00
parent f0fa6f7b68
commit 62718daf0b
29 changed files with 438 additions and 226 deletions

View File

@ -7,14 +7,5 @@ if (BACNET_FOUND)
set (reqlibname "libbacnet")
include_directories(${BACNET_INCLUDE_DIRS})
upm_module_init()
target_link_libraries(${libname} ${BACNET_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
if (BUILDSWIGNODE)
swig_link_libraries (jsupm_${libname} ${BACNET_LIBRARIES})
endif()
if (BUILDSWIGPYTHON)
swig_link_libraries (pyupm_${libname} ${BACNET_LIBRARIES})
endif()
if (BUILDSWIGJAVA)
swig_link_libraries (javaupm_${libname} ${BACNET_LIBRARIES})
endif()
upm_target_link_libraries(${libname} ${BACNET_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif ()