mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00

This commit attempts to use a more cmake-friendly approach when handling inter-target dependencies. A combination of macros and include_directories usage provided overzealous compile -I/blah entries which equates to large catch-all build commands. For example, the last CXX target contains include directories for nearly all preceeding targets (~190). Library dependencies were also often wrong or missing. * Removed nearly all used of include_directories (swig cmake commands still appear to need these for generating the swig command line) * Updated usage of target_link_libraries in upm_module_init, also changed to using target_include_directories per target. This greatly simplifies upm/mixed_module_init usage for libraries which depend on other libraries (in this project). example (src/tb7300/CMakeLists.txt) old: # upm-libbacnetmstp will bring in libbacnet, I hope set (reqlibname "upm-bacnetmstp") include_directories(${BACNET_INCLUDE_DIRS}) include_directories("../bacnetmstp") upm_module_init() upm_target_link_libraries(${libname} bacnetmstp) new: upm_module_init(bacnetmstp) The reason here, is that tb7300 depends on bacnetmstp, which depends on BACNET includes/libs, so tb7300 gets the headers and libraries transitively via its dependency on bacnetmstp. * Updated pkg-config .pc file generation flow to reflect changes with dependencies. * Create a real target for the interfaces (CXX abstract sensor classes). Renamed the directory from 'upm/src/upm' to 'upm/src/interfaces' Also changed the install location of the interface headers to include/upm/interfaces. Updated interface header usage to reflect this. * Updated a few sensor libs to use fwd declarations for mraa. Ideally the UPM libs would do more of this which eases the burden on anyone building on top of the sensor libraries since they would not need to know about mraa headers. * Fixed examples which use symbols not defined in local includes Signed-off-by: Noel Eck <noel.eck@intel.com>
21 lines
263 B
OpenEdge ABL
21 lines
263 B
OpenEdge ABL
%module jsupm_ads1x15
|
|
%include "../upm.i"
|
|
|
|
%include "iModuleStatus.hpp"
|
|
%include "iADC.hpp"
|
|
|
|
%include "ads1x15.hpp"
|
|
%{
|
|
#include "ads1x15.hpp"
|
|
%}
|
|
|
|
%include "ads1015.hpp"
|
|
%{
|
|
#include "ads1015.hpp"
|
|
%}
|
|
|
|
%include "ads1115.hpp"
|
|
%{
|
|
#include "ads1115.hpp"
|
|
%}
|