mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
upm: new standard for modules cmake file
* Update all previously updated modules Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
parent
54a4afc6a7
commit
cea5816c43
@ -19,7 +19,7 @@ macro(upm_SWIG_PYTHON)
|
|||||||
if(BUILDSWIGPYTHON)
|
if(BUILDSWIGPYTHON)
|
||||||
set (CMAKE_C_FLAGS -DSWIGPYTHON=${SWIG_FOUND})
|
set (CMAKE_C_FLAGS -DSWIGPYTHON=${SWIG_FOUND})
|
||||||
set_source_files_properties (pyupm_${libname}.i PROPERTIES CPLUSPLUS ON)
|
set_source_files_properties (pyupm_${libname}.i PROPERTIES CPLUSPLUS ON)
|
||||||
swig_add_module (pyupm_${libname} python pyupm_${libname}.i ${libname}.cxx)
|
swig_add_module (pyupm_${libname} python pyupm_${libname}.i ${module_src})
|
||||||
swig_link_libraries (pyupm_${libname} ${PYTHON_LIBRARIES} ${MAA_LIBRARIES})
|
swig_link_libraries (pyupm_${libname} ${PYTHON_LIBRARIES} ${MAA_LIBRARIES})
|
||||||
target_include_directories ( ${SWIG_MODULE_pyupm_${libname}_REAL_NAME}
|
target_include_directories ( ${SWIG_MODULE_pyupm_${libname}_REAL_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
@ -38,7 +38,7 @@ macro(upm_SWIG_NODE)
|
|||||||
set (CMAKE_CXX_FLAGS -DBUILDING_NODE_EXTENSION)
|
set (CMAKE_CXX_FLAGS -DBUILDING_NODE_EXTENSION)
|
||||||
set_source_files_properties (jsupm_${libname}.i PROPERTIES CPLUSPLUS ON)
|
set_source_files_properties (jsupm_${libname}.i PROPERTIES CPLUSPLUS ON)
|
||||||
set_source_files_properties (jsupm_${libname}.i PROPERTIES SWIG_FLAGS "-node")
|
set_source_files_properties (jsupm_${libname}.i PROPERTIES SWIG_FLAGS "-node")
|
||||||
swig_add_module (jsupm_${libname} javascript jsupm_${libname}.i ${libname}.cxx)
|
swig_add_module (jsupm_${libname} javascript jsupm_${libname}.i ${module_src})
|
||||||
swig_link_libraries (jsupm_${libname} ${MAA_LIBRARIES} ${NODE_LIBRARIES})
|
swig_link_libraries (jsupm_${libname} ${MAA_LIBRARIES} ${NODE_LIBRARIES})
|
||||||
target_include_directories ( ${SWIG_MODULE_jsupm_${libname}_REAL_NAME}
|
target_include_directories ( ${SWIG_MODULE_jsupm_${libname}_REAL_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
@ -94,6 +94,7 @@ if (SWIG_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
macro(upm_module_init)
|
macro(upm_module_init)
|
||||||
|
add_library (${libname} SHARED ${module_src})
|
||||||
include_directories (${MAA_INCLUDE_DIR} .)
|
include_directories (${MAA_INCLUDE_DIR} .)
|
||||||
target_link_libraries (${libname} ${MAA_LIBRARIES})
|
target_link_libraries (${libname} ${MAA_LIBRARIES})
|
||||||
set_target_properties(${libname} PROPERTIES PREFIX "libupm-")
|
set_target_properties(${libname} PROPERTIES PREFIX "libupm-")
|
||||||
@ -104,7 +105,7 @@ macro(upm_module_init)
|
|||||||
upm_doxygen()
|
upm_doxygen()
|
||||||
endif()
|
endif()
|
||||||
install (TARGETS ${libname} DESTINATION lib COMPONENT ${libname})
|
install (TARGETS ${libname} DESTINATION lib COMPONENT ${libname})
|
||||||
install (FILES ${libname}.h DESTINATION include/upm COMPONENT ${libname})
|
install (FILES ${module_h} DESTINATION include/upm COMPONENT ${libname})
|
||||||
|
|
||||||
if (IPK)
|
if (IPK)
|
||||||
cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
|
cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "buzzer")
|
set (libname "buzzer")
|
||||||
set (libdescription "upm buzzer")
|
set (libdescription "upm buzzer")
|
||||||
add_library (buzzer SHARED buzzer.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "grove")
|
set (libname "grove")
|
||||||
set (libdescription "upm grove module")
|
set (libdescription "upm grove module")
|
||||||
add_library (grove SHARED grove.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "hcsr04")
|
set (libname "hcsr04")
|
||||||
set (libdescription "upm proximity sensor")
|
set (libdescription "upm proximity sensor")
|
||||||
add_library (hcsr04 SHARED hcsr04.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "hmc5883l")
|
set (libname "hmc5883l")
|
||||||
set (libdescription "libupm Digital Compass")
|
set (libdescription "libupm Digital Compass")
|
||||||
add_library (hmc5883l SHARED hmc5883l.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "max44000")
|
set (libname "max44000")
|
||||||
set (libdescription "upm MAX44000")
|
set (libdescription "upm MAX44000")
|
||||||
add_library (max44000 SHARED max44000.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "mma7455")
|
set (libname "mma7455")
|
||||||
set (libdescription "upm MMA7455")
|
set (libdescription "upm MMA7455")
|
||||||
add_library (mma7455 SHARED mma7455.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "my9221")
|
set (libname "my9221")
|
||||||
set (libdescription "upm ledbar")
|
set (libdescription "upm ledbar")
|
||||||
add_library (${libname} SHARED my9221.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "nrf24l01")
|
set (libname "nrf24l01")
|
||||||
set (libdescription "libupm NRF tx/rx")
|
set (libdescription "libupm NRF tx/rx")
|
||||||
add_library (nrf24l01 SHARED nrf24l01.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set (libname "tm1637")
|
set (libname "tm1637")
|
||||||
set (libdescription "upm 4 digit display tm1637")
|
set (libdescription "upm 4 digit display tm1637")
|
||||||
add_library (${libname} SHARED tm1637.cxx)
|
set (module_src ${libname}.cxx)
|
||||||
|
set (module_h ${libname}.h)
|
||||||
upm_module_init()
|
upm_module_init()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user