Skip to content

Commit

Permalink
Update ASSIMP_VENDOR CMakeLists.txt (#1226)
Browse files Browse the repository at this point in the history
CLEAN UNUSED CHECK
SE MIN ASSIMP VERSION TO 5.3.1
SET C++ VERSION TO 17

Signed-off-by: mosfet80 <[email protected]>
  • Loading branch information
mosfet80 authored Jul 15, 2024
1 parent 59afda5 commit 5f896af
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions rviz_assimp_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@ project(rviz_assimp_vendor)
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_vendor_package REQUIRED)

# Override ON so that the following CMake logic in assimp 5.0.1 and older
# doesn't result in a CMake warning: if(ON)
# https://github.com/ros2/rviz/issues/524
# https://bugs.launchpad.net/ubuntu/+source/assimp/+bug/1869405
set(ON 1)

# TODO: Switch to version range in find_package in CMake 3.19
find_package(assimp QUIET)
if(NOT assimp_FOUND OR "${assimp_VERSION}" VERSION_LESS 5.2.0)
if(NOT assimp_FOUND OR "${assimp_VERSION}" VERSION_LESS 5.3.1)
set(assimp_FOUND FALSE)
endif()

Expand All @@ -28,7 +22,7 @@ if(MSVC)
else()
set(ASSIMP_CMAKE_FLAGS "-DCMAKE_INSTALL_LIBDIR=lib")

set(ASSIMP_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}")
set(ASSIMP_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS}")
# assimp version 5.3.1 still uses K&R style function prototypes,
# which are deprecated as of gcc 13.2 (in Ubuntu 24.04).
# Suppress the warning here for now.
Expand Down

0 comments on commit 5f896af

Please sign in to comment.