From 685a8195f17a5cb8fa9b293299f4601cf73321a6 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 23 Jun 2021 17:36:09 +0200 Subject: [PATCH] Detect ign instead of using cmake module to check for ignition-tools Signed-off-by: Jose Luis Rivero --- CMakeLists.txt | 5 ++--- tools/CMakeLists.txt | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c06bd46..5782528c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,9 +42,8 @@ ign_find_package(ignition-math6 REQUIRED) set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR}) #-------------------------------------- -# Find ignition-tools -ign_find_package(ignition-tools - QUIET) +# Find if ign command is available +find_program(HAVE_IGN_TOOLS ign) #============================================================================ # Configure the build diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 7435362a..6e6bbbe3 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -12,6 +12,7 @@ if (MSVC) list(REMOVE_ITEM test_sources ign_TEST.cc) endif() -if (IGNITION-TOOLS_BINARY_DIRS) + +if (HAVE_IGN_TOOLS) ign_build_tests(TYPE UNIT SOURCES ${test_sources}) endif ()