Skip to content

Commit 010ea25

Browse files
daipomkoubkmgit
authored
Add installation of executables (#59)
Fixes #55 --------- Co-authored-by: Sutou Kouhei <kou@clear-code.com> Co-authored-by: Benson Muite <benson_muite@emailplus.org>
1 parent 6e1fa67 commit 010ea25

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,21 @@ configure_file(openarm-can.pc.in ${CMAKE_CURRENT_BINARY_DIR}/openarm-can.pc
118118
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openarm-can.pc
119119
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
120120

121+
set(OPENARM_CAN_LIBEXEC_DIR "${CMAKE_INSTALL_LIBEXECDIR}/openarm-can")
122+
121123
add_executable(motor-check setup/motor_check.cpp)
122124
target_link_libraries(motor-check openarm_can)
125+
install(TARGETS motor-check DESTINATION ${OPENARM_CAN_LIBEXEC_DIR})
123126

124127
# Add motor control example executable
125128
add_executable(openarm-demo examples/demo.cpp)
126129
target_link_libraries(openarm-demo openarm_can)
130+
install(TARGETS openarm-demo DESTINATION ${OPENARM_CAN_LIBEXEC_DIR})
131+
132+
# Install scripts
133+
install(PROGRAMS setup/change_baudrate.py setup/configure_socketcan.sh
134+
setup/configure_socketcan_4_arms.sh setup/set_zero.sh
135+
DESTINATION ${OPENARM_CAN_LIBEXEC_DIR})
127136

128137
# Add tests
129138
if(BUILD_TESTING)

packages/debian/libopenarm-can-dev.install

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
usr/include/*
15+
usr/include/
1616
usr/lib/*/lib*.so
17-
usr/lib/*/pkgconfig/*
18-
usr/lib/*/cmake/OpenArmCAN/*
17+
usr/lib/*/pkgconfig/
18+
usr/lib/*/cmake/OpenArmCAN/

packages/debian/openarm-can-utils.install

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
setup/configure_socketcan.sh usr/libexec/openarm-can
16-
setup/set_zero.sh usr/libexec/openarm-can
17-
setup/change_baudrate.py usr/libexec/openarm-can
15+
usr/libexec/

packages/fedora/openarm-can.spec

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
3636
%description devel
3737
Header files and development libraries for OpenARM CAN control library.
3838

39+
%package utils
40+
Summary: Setup and configuration utility scripts
41+
42+
%description utils
43+
Setup and configuration utility scripts.
44+
3945
%prep
4046
%autosetup
4147

@@ -60,5 +66,9 @@ Header files and development libraries for OpenARM CAN control library.
6066
%{_libdir}/libopenarm_can.so
6167
%{_libdir}/pkgconfig/openarm-can.pc
6268

69+
%files utils
70+
%license LICENSE.txt
71+
%{_libexecdir}/openarm-can/
72+
6373
%changelog
6474
%autochangelog

0 commit comments

Comments
 (0)