diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fba60f1023..78681b64d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,6 +164,7 @@ jobs: os: - ubuntu-latest docker_image: + - "debian:buster-backports" - "ubuntu:20.04" - "ubuntu:22.04" @@ -183,6 +184,11 @@ jobs: git build-essential cmake libace-dev coinor-libipopt-dev libeigen3-dev swig \ libxml2-dev liboctave-dev python3-dev python3-numpy valgrind libassimp-dev libirrlicht-dev curl unzip libglfw3-dev + - name: Install CMake 3.16 [Docker/Debian Buster] + if: matrix.docker_image == 'debian:buster-backports' + run: | + apt-get -y -t buster-backports install cmake + - name: Install files to enable compilation of mex files [apt] run: | curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020b_mexa64.zip diff --git a/CHANGELOG.md b/CHANGELOG.md index 5355d734e9..4dbce497aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fixed compilation of IDYNTREE_USES_ASSIMP option in Debian 10 Buster (https://github.com/robotology/idyntree/pull/1148). + ## [10.2.0] - 2024-01-12 ### Added diff --git a/src/visualization/CMakeLists.txt b/src/visualization/CMakeLists.txt index 64b0a78856..44fede40c4 100644 --- a/src/visualization/CMakeLists.txt +++ b/src/visualization/CMakeLists.txt @@ -102,13 +102,19 @@ if(IDYNTREE_USES_MESHCATCPP) target_link_libraries(${libraryname} PRIVATE MeshcatCpp::MeshcatCpp) endif() -if(IDYNTREE_USES_ASSIMP) - target_compile_definitions(${libraryname} PRIVATE IDYNTREE_USES_ASSIMP) +if (IDYNTREE_USES_ASSIMP) + target_compile_definitions(${libraryname} PRIVATE IDYNTREE_USES_ASSIMP) + # See similar code in solid-shapes CMakeLists.txt + if((assimp_VERSION AND assimp_VERSION VERSION_GREATER_EQUAL 5.0) OR WIN32) target_link_libraries(${libraryname} PRIVATE assimp::assimp) + else() + target_include_directories(${libraryname} PRIVATE "${ASSIMP_INCLUDE_DIRS}") + link_directories("${ASSIMP_LIBRARY_DIRS}") + target_link_libraries(${libraryname} PRIVATE "${ASSIMP_LIBRARIES}") + endif() endif() - install(TARGETS ${libraryname} EXPORT iDynTree RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin