From 3f42be359266a780ca2fe853a46dc2a21b49bd84 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Thu, 26 Dec 2024 03:57:56 +0000 Subject: [PATCH] [zdepth] [ros-o] only use STREQUAL to compare ROS_DISTRO in cmake --- 3rdparty/zdepth/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3rdparty/zdepth/CMakeLists.txt b/3rdparty/zdepth/CMakeLists.txt index 21534fb14..08b996951 100644 --- a/3rdparty/zdepth/CMakeLists.txt +++ b/3rdparty/zdepth/CMakeLists.txt @@ -3,7 +3,9 @@ project(zdepth) include(ExternalProject) -if(NOT "$ENV{ROS_DISTRO}" STREQUAL "indigo" OR NOT "$ENV{ROS_DISTRO}" STREQUAL "kinetic") +if(("$ENV{ROS_DISTRO}" STREQUAL "indigo") OR ("$ENV{ROS_DISTRO}" STREQUAL "kinetic")) + install(CODE "message(WARNING \"Skipping zdepth install because ROS is too old\")") +else() ExternalProject_Add( zdepth GIT_REPOSITORY https://github.com/catid/Zdepth.git @@ -15,6 +17,4 @@ if(NOT "$ENV{ROS_DISTRO}" STREQUAL "indigo" OR NOT "$ENV{ROS_DISTRO}" STREQUAL " ) install(CODE "execute_process(COMMAND make install WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/zdepth-prefix/src/zdepth-build)") -else() - install(CODE "message(WARNING \"Skipping zdepth install because ROS is too old\")") endif()