From 0ef9fd3001ea786e5d65e4c6e397dc32cff10522 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Sun, 30 Aug 2020 09:58:22 -0700 Subject: [PATCH] Support IN_LIST operator in DARTConfig.cmake (6.9 backport) (#1494) * DARTFindBullet: set CMP0057 to new The IN_LIST keyword in DARTFindBullet caused a configuration error in gazebo10. Setting CMP0057 to new should prevent similar problems in downstream packages. * Use approach from #1434 --- cmake/DARTConfig.cmake.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmake/DARTConfig.cmake.in b/cmake/DARTConfig.cmake.in index 84450a92ab342..4145b8d4ed12c 100644 --- a/cmake/DARTConfig.cmake.in +++ b/cmake/DARTConfig.cmake.in @@ -10,6 +10,20 @@ # dart - Main target. # dart- - Target for specific component (e.g., dart-collision-bullet). +# Specify CMake minimum required version +if(NOT CMAKE_MINIMUM_REQUIRED_VERSION) + if(MSVC) + cmake_minimum_required(VERSION 3.8.0) + else() + cmake_minimum_required(VERSION 3.5.1) + endif() +else() + # Support if() IN_LIST operator + if(POLICY CMP0057) + cmake_policy(SET CMP0057 NEW) + endif() +endif() + #=============================================================================== # Helper Function Definitions #===============================================================================