Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Extern library to the latest XDA (2022.0.0) #38

Merged
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ build*/
# Temporary file generated by the mtsdk make
*.dpp
Makefile

# Clangd files
**/.cache
**/compile_commands.json
48 changes: 35 additions & 13 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@
# Copyright (C) 2017-2018 iCub Facility, Istituto Italiano di Tecnologia
# Copyright (C) 2017-2023 Fondazione Istituto Italiano di Tecnologia
# Authors: Silvio Traversaro <silvio.traversaro@iit.it>
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LICENSE

# The code contained in this directory is imported directly from the src_cpp example
# in the MT Software Suite, version 4.8.2, available from https://www.xsens.com/mt-software-suite/
# The code contained in this directory is imported directly from the src_cpp example
# in the MT Software Suite, version 2022.0.0, available from https://www.movella.com/support/software-documentation/
# If you want to update the code to a new version of the MT Software Suite, run make in the mtsdk
# example directory and copy the relevant files from the src_example in this directory.
# example directory and copy the xspublic files from the public directory in this directory.
# Furthermore, you should update the CMake scripts options by inspecting the xspublic's Makefiles

# Globbing should be avoided in general, but this is a library that we use directly as provided by Xsens
file(GLOB xcommunication_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/xcommunication/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xcommunication/*.c)
file(GLOB xstypes_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/xstypes/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xstypes/*.c)
add_library(xsens_mt_software_suite STATIC deviceclass.cpp ${xcommunication_SRCS} ${xstypes_SRCS})
target_include_directories(xsens_mt_software_suite PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/xcommunication
${CMAKE_CURRENT_SOURCE_DIR}/include/xsens)
find_package (Threads)
target_link_libraries(xsens_mt_software_suite PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})

# Globbing should be avoided in general, but this is a library that we use directly as provided by Xsens
file(GLOB xstypes_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xstypes/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xstypes/*.c)
# See EXCLUDE argument in xstypes' Makefile
list(FILTER xstypes_SRCS EXCLUDE REGEX "xstypesdynlib")
add_library(xstypes STATIC ${xstypes_SRCS})
target_include_directories(xstypes PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/xspublic)
target_include_directories(xstypes PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xstypes)
target_link_libraries(xstypes PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})


file(GLOB xscommon_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xscommon/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xscommon/*.c)
add_library(xscommon STATIC ${xscommon_SRCS})
target_include_directories(xscommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/xspublic)
target_include_directories(xscommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xscommon)
target_compile_options(xscommon PRIVATE "SHELL:-include xscommon_config.h" "SHELL:-include xstypes/xsens_compat.h")
target_link_libraries(xscommon PUBLIC xstypes)


file(GLOB xscontroller_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xscontroller/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xscontroller/*.c)
add_library(xscontroller STATIC ${xscontroller_SRCS})
target_include_directories(xscontroller PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/xspublic)
target_include_directories(xscontroller PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/xspublic/xscontroller)
target_compile_options(xscontroller PRIVATE "SHELL:-include xscontrollerconfig.h")
target_compile_definitions(xscontroller PRIVATE -DHAVE_JOURNALLER)
target_link_libraries(xscontroller PUBLIC xstypes xscommon)


add_library(xsens_mt_software_suite INTERFACE)
target_link_libraries(xsens_mt_software_suite INTERFACE xstypes xscommon xscontroller)
243 changes: 0 additions & 243 deletions extern/deviceclass.cpp

This file was deleted.

73 changes: 0 additions & 73 deletions extern/deviceclass.h

This file was deleted.

Loading