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>
This commit is contained in:
parent
6e1fa67cf2
commit
010ea250f7
@ -118,12 +118,21 @@ configure_file(openarm-can.pc.in ${CMAKE_CURRENT_BINARY_DIR}/openarm-can.pc
|
|||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openarm-can.pc
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openarm-can.pc
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
|
||||||
|
set(OPENARM_CAN_LIBEXEC_DIR "${CMAKE_INSTALL_LIBEXECDIR}/openarm-can")
|
||||||
|
|
||||||
add_executable(motor-check setup/motor_check.cpp)
|
add_executable(motor-check setup/motor_check.cpp)
|
||||||
target_link_libraries(motor-check openarm_can)
|
target_link_libraries(motor-check openarm_can)
|
||||||
|
install(TARGETS motor-check DESTINATION ${OPENARM_CAN_LIBEXEC_DIR})
|
||||||
|
|
||||||
# Add motor control example executable
|
# Add motor control example executable
|
||||||
add_executable(openarm-demo examples/demo.cpp)
|
add_executable(openarm-demo examples/demo.cpp)
|
||||||
target_link_libraries(openarm-demo openarm_can)
|
target_link_libraries(openarm-demo openarm_can)
|
||||||
|
install(TARGETS openarm-demo DESTINATION ${OPENARM_CAN_LIBEXEC_DIR})
|
||||||
|
|
||||||
|
# Install scripts
|
||||||
|
install(PROGRAMS setup/change_baudrate.py setup/configure_socketcan.sh
|
||||||
|
setup/configure_socketcan_4_arms.sh setup/set_zero.sh
|
||||||
|
DESTINATION ${OPENARM_CAN_LIBEXEC_DIR})
|
||||||
|
|
||||||
# Add tests
|
# Add tests
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
usr/include/*
|
usr/include/
|
||||||
usr/lib/*/lib*.so
|
usr/lib/*/lib*.so
|
||||||
usr/lib/*/pkgconfig/*
|
usr/lib/*/pkgconfig/
|
||||||
usr/lib/*/cmake/OpenArmCAN/*
|
usr/lib/*/cmake/OpenArmCAN/
|
||||||
|
|||||||
@ -12,6 +12,4 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
setup/configure_socketcan.sh usr/libexec/openarm-can
|
usr/libexec/
|
||||||
setup/set_zero.sh usr/libexec/openarm-can
|
|
||||||
setup/change_baudrate.py usr/libexec/openarm-can
|
|
||||||
|
|||||||
@ -36,6 +36,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%description devel
|
%description devel
|
||||||
Header files and development libraries for OpenARM CAN control library.
|
Header files and development libraries for OpenARM CAN control library.
|
||||||
|
|
||||||
|
%package utils
|
||||||
|
Summary: Setup and configuration utility scripts
|
||||||
|
|
||||||
|
%description utils
|
||||||
|
Setup and configuration utility scripts.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%autosetup
|
||||||
|
|
||||||
@ -60,5 +66,9 @@ Header files and development libraries for OpenARM CAN control library.
|
|||||||
%{_libdir}/libopenarm_can.so
|
%{_libdir}/libopenarm_can.so
|
||||||
%{_libdir}/pkgconfig/openarm-can.pc
|
%{_libdir}/pkgconfig/openarm-can.pc
|
||||||
|
|
||||||
|
%files utils
|
||||||
|
%license LICENSE.txt
|
||||||
|
%{_libexecdir}/openarm-can/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user