Skip to content

Commit

Permalink
Fix compilation of IDYNTREE_USES_ASSIMP option in Debian Buster 10
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Jan 16, 2024
1 parent 5600cf2 commit a96258a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ if(IDYNTREE_USES_ASSIMP)
target_link_libraries(${libraryname} PRIVATE assimp::assimp)
endif()

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}
Expand Down

0 comments on commit a96258a

Please sign in to comment.