cmake: Updated pkg_check_modules usage for TPV libraries

* Moved CMAKE_MODULE_PATH append hier in top-level CMakeLists file
      so that it's before all calls to find_package.
    * Added pkg_check_modules for BACNET, MODBUS, JPEG, and OPENZWAVE
      to top-level CMakeLists file.
    * Removed pkg_check_modules from individual sensor libraries.
    * Simplified SWIG find_package call - require 3.0.5 for all SWIG
      wrappers.
    * Moved options to beginning of top-level CMakeLists.

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2016-09-27 15:17:29 -07:00
parent dd9050e0aa
commit c3a5b8dd3c
10 changed files with 38 additions and 43 deletions

View File

@ -3,12 +3,10 @@ set (libdescription "upm driver module for BACnet MS/TP devices")
set (module_src ${libname}.cxx device-client.c bacnetutil.cxx)
set (module_hpp ${libname}.hpp bacnetutil.hpp)
pkg_check_modules(BACNET libbacnet)
if (BACNET_FOUND)
set (reqlibname "libbacnet")
include_directories(${BACNET_INCLUDE_DIRS})
upm_module_init()
add_dependencies(${libname} ${BACNET_LIBRARIES})
target_link_libraries(${libname} ${BACNET_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
if (BUILDSWIGNODE)
swig_link_libraries (jsupm_${libname} ${BACNET_LIBRARIES})

View File

@ -3,7 +3,6 @@ set (libdescription "upm module for the Veris E50HX (E50H2/E50H5)Energy Meters")
set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp)
pkg_check_modules(BACNET libbacnet)
if (BACNET_FOUND)
# upm-libbacnetmstp will bring in libbacnet, I hope
set (reqlibname "upm-bacnetmstp")

View File

@ -3,7 +3,6 @@ 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})

View File

@ -3,7 +3,6 @@ set (libdescription "upm module for the Veris HWXPXX (HWXPHTX)")
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})

View File

@ -3,7 +3,6 @@ set (libdescription "upm module for the OpenZWave library interface")
set (module_src ${libname}.cxx zwNode.cxx ozwinterface.cxx ozwdump.cxx aeotecss6.cxx aeotecsdg2.cxx aeotecdw2e.cxx aeotecdsb09104.cxx tzemt400.cxx)
set (module_hpp ${libname}.hpp ozwinterface.hpp ozwdump.hpp aeotecss6.hpp aeotecsdg2.hpp aeotecdw2e.hpp aeotecdsb09104.hpp tzemt400.hpp)
pkg_check_modules(OPENZWAVE libopenzwave)
if (OPENZWAVE_FOUND)
set (reqlibname "libopenzwave")
include_directories(${OPENZWAVE_INCLUDE_DIRS})

View File

@ -3,7 +3,6 @@ set (libdescription "upm module for the Comet System T3311")
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})

View File

@ -3,7 +3,6 @@ set (libdescription "upm module for the Telaire T8100 Ventostat")
set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp)
pkg_check_modules(BACNET libbacnet)
if (BACNET_FOUND)
# upm-libbacnetmstp will bring in libbacnet, I hope
set (reqlibname "upm-bacnetmstp")

View File

@ -3,7 +3,6 @@ set (libdescription "upm module for the TB7300 Fan Coil Thermostat")
set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp)
pkg_check_modules(BACNET libbacnet)
if (BACNET_FOUND)
# upm-libbacnetmstp will bring in libbacnet, I hope
set (reqlibname "upm-bacnetmstp")

View File

@ -3,7 +3,6 @@ set (libdescription "upm Video Frame Capture and image save utility")
set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp)
find_package (JPEG)
if (JPEG_FOUND)
set (reqlibname "jpeg")
upm_module_init()
@ -17,4 +16,4 @@ if (JPEG_FOUND)
if (BUILDSWIGJAVA)
swig_link_libraries (javaupm_${libname} jpeg)
endif()
endif()
endif()