From cc7d1c9983e2c003cfc66f1f6045c0459ee79b46 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 22 Jul 2024 19:35:50 -0400 Subject: [PATCH] Revert "Update ASSIMP_VENDOR CMakeLists.txt (#1226)" (#1249) This reverts commit 5f896af4f4edbd5d9aa76dc966b5390cdb570716. --- rviz_assimp_vendor/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rviz_assimp_vendor/CMakeLists.txt b/rviz_assimp_vendor/CMakeLists.txt index a8b7bdb00..1a5ce0c7c 100644 --- a/rviz_assimp_vendor/CMakeLists.txt +++ b/rviz_assimp_vendor/CMakeLists.txt @@ -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() @@ -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.