Browse Source

upm: add install options to all current libraries

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
Thomas Ingleby 10 years ago
parent
commit
fdb943c2eb

+ 1
- 0
CMakeLists.txt View File

@@ -25,5 +25,6 @@ if (DOXYGEN_FOUND)
25 25
   )
26 26
 endif (DOXYGEN_FOUND)
27 27
 
28
+include(CPack)
28 29
 add_subdirectory (src)
29 30
 add_subdirectory (examples)

+ 6
- 0
src/4digitdisplay/CMakeLists.txt View File

@@ -2,3 +2,9 @@ set (libname "4digitdisplay")
2 2
 add_library (4digitdisplay SHARED tm1637.cxx)
3 3
 include_directories (${MAA_INCLUDE_DIR})
4 4
 target_link_libraries (4digitdisplay ${MAA_LIBRARIES})
5
+
6
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
7
+install (FILES tm1637.h DESTINATION include/upm COMPONENT ${libname})
8
+
9
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
10
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm 4 Digit Buzzer")

+ 6
- 0
src/buzzer/CMakeLists.txt View File

@@ -2,3 +2,9 @@ set (libname "buzzer")
2 2
 add_library (buzzer SHARED buzzer.cxx)
3 3
 include_directories (${MAA_INCLUDE_DIR})
4 4
 target_link_libraries (buzzer ${MAA_LIBRARIES})
5
+
6
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
7
+install (FILES buzzer.h DESTINATION include/upm COMPONENT ${libname})
8
+
9
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
10
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm buzzer")

+ 6
- 0
src/grove/CMakeLists.txt View File

@@ -37,3 +37,9 @@ if (SWIG_FOUND)
37 37
   endif ()
38 38
 
39 39
 endif ()
40
+
41
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
42
+install (FILES grove.h DESTINATION include/upm COMPONENT ${libname})
43
+
44
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
45
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm grove libary")

+ 6
- 0
src/hcsr04/CMakeLists.txt View File

@@ -2,3 +2,9 @@ set (libname "hcsr04")
2 2
 add_library (hcsr04 SHARED hcsr04.cxx)
3 3
 include_directories (${MAA_INCLUDE_DIR})
4 4
 target_link_libraries (hcsr04 ${MAA_LIBRARIES})
5
+
6
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
7
+install (FILES hcsr04.h DESTINATION include/upm COMPONENT ${libname})
8
+
9
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
10
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm proximity sensor")

+ 6
- 0
src/hmc5883l/CMakeLists.txt View File

@@ -37,3 +37,9 @@ if (SWIG_FOUND)
37 37
   endif ()
38 38
 
39 39
 endif ()
40
+
41
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
42
+install (FILES hmc5883l.h DESTINATION include/upm COMPONENT ${libname})
43
+
44
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
45
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm Digital Compass")

+ 6
- 0
src/lcd/CMakeLists.txt View File

@@ -2,3 +2,9 @@ set (libname "i2clcd")
2 2
 add_library (i2clcd SHARED iiclcd.cxx lcm1602.cxx jhd1313m1.cxx)
3 3
 include_directories (${MAA_INCLUDE_DIR})
4 4
 target_link_libraries (i2clcd ${MAA_LIBRARIES})
5
+
6
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
7
+install (FILES iiclcd.h DESTINATION include/upm COMPONENT ${libname})
8
+
9
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
10
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm lcd")

+ 7
- 0
src/ledbar/CMakeLists.txt View File

@@ -2,3 +2,10 @@ set (libname "ledbar")
2 2
 add_library (ledbar SHARED my9221.cxx)
3 3
 include_directories (${MAA_INCLUDE_DIR})
4 4
 target_link_libraries (ledbar ${MAA_LIBRARIES})
5
+
6
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
7
+install (FILES my9221.h DESTINATION include/upm COMPONENT ${libname})
8
+
9
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
10
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm LEDBAR")
11
+

+ 6
- 0
src/nrf24l01/CMakeLists.txt View File

@@ -2,3 +2,9 @@ set (libname "nrf24l01")
2 2
 add_library (nrf24l01 SHARED nrf24l01.cxx)
3 3
 include_directories (${MAA_INCLUDE_DIR})
4 4
 target_link_libraries (nrf24l01 ${MAA_LIBRARIES})
5
+
6
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
7
+install (FILES nrf24l01.h DESTINATION include/upm COMPONENT ${libname})
8
+
9
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
10
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm NRF tx/rx")

+ 6
- 0
src/servo/CMakeLists.txt View File

@@ -2,3 +2,9 @@ set (libname "servo")
2 2
 add_library (servo SHARED servo.cxx es08a.cxx)
3 3
 include_directories (${MAA_INCLUDE_DIR})
4 4
 target_link_libraries (servo ${MAA_LIBRARIES})
5
+
6
+install (TARGETS ${libname} DESTINATION lib/upm COMPONENT ${libname})
7
+install (FILES servo.h DESTINATION include/upm COMPONENT ${libname})
8
+
9
+cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all)
10
+set(CPACK_COMPONENT_${libname}_DESCRIPTION "libupm servo")