diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e47889a10d..d288ca847a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,14 @@ jobs: unzip vcpkg-robotology.zip -d C:/robotology/vcpkg # Overwrite the VCPKG_INSTALLATION_ROOT env variable defined by GitHub Actions to point to our vcpkg echo "::set-env name=VCPKG_INSTALLATION_ROOT::C:/robotology/vcpkg" - + - name: Additional vcpkg Dependencies [Windows] + if: matrix.os == 'windows-latest' + shell: bash + run: | + # Install dependencies that are not included in the robotology-superbuild-dependencies-vcpkg archive (for now) + ${VCPKG_INSTALLATION_ROOT}/vcpkg.exe install assimp:x64-windows + - name: Dependencies [macOS] if: matrix.os == 'macOS-latest' run: | @@ -146,9 +152,8 @@ jobs: mkdir -p build cd build # ipopt disabled until https://github.com/robotology/idyntree/issues/274 is fixed - # assimp disabled until https://github.com/robotology/idyntree/issues/601 is fixed cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \ - -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=OFF -DIDYNTREE_USES_ICUB_MAIN:BOOL=OFF -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON \ + -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_ASSIMP:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=OFF -DIDYNTREE_USES_ICUB_MAIN:BOOL=OFF -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON \ -DIDYNTREE_USES_PYTHON:BOOL=OFF -DIDYNTREE_USES_OCTAVE:BOOL=OFF -DIDYNTREE_USES_IPOPT:BOOL=OFF -DIDYNTREE_USES_ASSIMP:BOOL=OFF \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install .. @@ -158,7 +163,7 @@ jobs: run: | mkdir -p build cd build - # IDYNTREE_USES_ASSIMP set to OFF as a workaround for https://github.com/robotology/idyntree/issues/599 + # Assimp is disabled as workaround for https://github.com/robotology/idyntree/issues/599 cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=ON \ -DIDYNTREE_USES_ICUB_MAIN:BOOL=ON -DIDYNTREE_USES_Qt5:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DIDYNTREE_USES_ASSIMP:BOOL=OFF \ -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install .. @@ -167,7 +172,8 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | cd build - cmake -DIDYNTREE_USES_OCTAVE:BOOL=ON -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON -DIDYNTREE_USES_KDL:BOOL=ON . + # Assimp is disabled on Ubuntu as a workaround for https://github.com/robotology/idyntree/issues/663 + cmake -DIDYNTREE_USES_OCTAVE:BOOL=ON -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON -DIDYNTREE_USES_KDL:BOOL=ON -DIDYNTREE_USES_ASSIMP:BOOL=OFF . # For some reason, Ubuntu 18.04 image in GitHub Actions contain OpenBLAS 0.3.5, that is affected by https://github.com/xianyi/OpenBLAS/issues/2003 # As a workaround, we test against the regular blas instead of openblas sudo apt-get install libblas-dev libatlas-base-dev diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dc4e4c08a1..824033f7c32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.0.3] - 2020-04-01 + +### Fixed +- Fixed configuration and compilation with Assimp >= 5.0.0 . + ## [1.0.2] - 2020-02-21 ### Fixed diff --git a/cmake/iDynTreeDependencies.cmake b/cmake/iDynTreeDependencies.cmake index faff4d11bb0..64dc7f77693 100644 --- a/cmake/iDynTreeDependencies.cmake +++ b/cmake/iDynTreeDependencies.cmake @@ -98,4 +98,4 @@ if(IDYNTREE_USES_ALGLIB AND ALGLIB_FOUND) endif() idyntree_handle_dependency(WORHP DO_NOT_SILENTLY_SEARCH) # Workaround for https://github.com/robotology/idyntree/issues/599 -idyntree_handle_dependency(ASSIMP DO_NOT_SILENTLY_SEARCH MAIN_TARGET assimp::assimp) +idyntree_handle_dependency(assimp DO_NOT_SILENTLY_SEARCH MAIN_TARGET assimp::assimp) diff --git a/src/solid-shapes/CMakeLists.txt b/src/solid-shapes/CMakeLists.txt index 14f8b549d6b..9d4443fff2e 100644 --- a/src/solid-shapes/CMakeLists.txt +++ b/src/solid-shapes/CMakeLists.txt @@ -16,9 +16,16 @@ target_include_directories(${libraryname} PRIVATE ${EIGEN3_INCLUDE_DIR}) if (IDYNTREE_USES_ASSIMP) target_compile_definitions(${libraryname} PRIVATE IDYNTREE_USES_ASSIMP) - target_include_directories(${libraryname} PRIVATE "${ASSIMP_INCLUDE_DIRS}") - link_directories("${ASSIMP_LIBRARY_DIRS}") - target_link_libraries(${libraryname} PRIVATE "${ASSIMP_LIBRARIES}") + # Depending on the assimp version, the way of consuming assimp changes + # In assimp 5.0, only the imported assimp::assimp target is defined, in earlier + # versions (that do no export the version to CMake) the ASSIMP_* variables are defined + if(assimp_VERSION AND assimp_VERSION VERSION_GREATER_EQUAL 5.0) + target_link_libraries(${libraryname} PRIVATE "${ASSIMP_LIBRARIES}") + else() + target_include_directories(${libraryname} PRIVATE "${ASSIMP_INCLUDE_DIRS}") + link_directories("${ASSIMP_LIBRARY_DIRS}") + target_link_libraries(${libraryname} PRIVATE "${ASSIMP_LIBRARIES}") + endif() endif() set_property(TARGET ${libraryname} PROPERTY PUBLIC_HEADER ${IDYNTREE_SOLID_SHAPES_HEADERS})