summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/h803x/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'peripheral/libupm/src/h803x/CMakeLists.txt')
-rw-r--r--peripheral/libupm/src/h803x/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/peripheral/libupm/src/h803x/CMakeLists.txt b/peripheral/libupm/src/h803x/CMakeLists.txt
new file mode 100644
index 0000000..3c723b0
--- /dev/null
+++ b/peripheral/libupm/src/h803x/CMakeLists.txt
@@ -0,0 +1,23 @@
+set (libname "h803x")
+set (libdescription "upm module for the Veris H803X (H8035/H8036)")
+set (module_src ${libname}.cxx)
+set (module_hpp ${libname}.hpp)
+
+pkg_check_modules(MODBUS libmodbus)
+if (MODBUS_FOUND)
+ set (reqlibname "libmodbus")
+ include_directories(${MODBUS_INCLUDE_DIRS})
+ upm_module_init()
+ target_link_libraries(${libname} ${MODBUS_LIBRARIES})
+ if (BUILDSWIG)
+ if (BUILDSWIGNODE)
+ swig_link_libraries (jsupm_${libname} ${MODBUS_LIBRARIES})
+ endif()
+ if (BUILDSWIGPYTHON)
+ swig_link_libraries (pyupm_${libname} ${MODBUS_LIBRARIES})
+ endif()
+ if (BUILDSWIGJAVA)
+ swig_link_libraries (javaupm_${libname} ${MODBUS_LIBRARIES})
+ endif()
+ endif()
+endif ()