Skip to content

Commit

Permalink
Revert "Update ASSIMP_VENDOR CMakeLists.txt (#1226)" (#1249)
Browse files Browse the repository at this point in the history
This reverts commit 5f896af.
  • Loading branch information
clalancette authored Jul 22, 2024
1 parent 642b1a3 commit cc7d1c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rviz_assimp_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ 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.3.1)
if(NOT assimp_FOUND OR "${assimp_VERSION}" VERSION_LESS 5.2.0)
set(assimp_FOUND FALSE)
endif()

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

set(ASSIMP_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS}")
set(ASSIMP_CXX_FLAGS "-std=c++14 ${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 cc7d1c9

Please sign in to comment.