From 5f4fbc9f1990fd4e8a31493b0dfb87b29d03a7c9 Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Tue, 4 Feb 2025 17:28:10 +0100 Subject: [PATCH] fix ParseIDL --- plotjuggler_plugins/CMakeLists.txt | 5 +---- plotjuggler_plugins/ParserIDL/CMakeLists.txt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/plotjuggler_plugins/CMakeLists.txt b/plotjuggler_plugins/CMakeLists.txt index 795f350f0..641764b32 100644 --- a/plotjuggler_plugins/CMakeLists.txt +++ b/plotjuggler_plugins/CMakeLists.txt @@ -23,7 +23,4 @@ add_subdirectory( ParserLineInflux ) add_subdirectory( PluginsZcm ) -## if subdirectory exist -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR/ParserIDL/dds_parser}") - add_subdirectory( ParserIDL ) -endif() +add_subdirectory( ParserIDL ) diff --git a/plotjuggler_plugins/ParserIDL/CMakeLists.txt b/plotjuggler_plugins/ParserIDL/CMakeLists.txt index 0b69ed7e9..524ad193f 100644 --- a/plotjuggler_plugins/ParserIDL/CMakeLists.txt +++ b/plotjuggler_plugins/ParserIDL/CMakeLists.txt @@ -1,15 +1,15 @@ +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/dds_parser") + set(DDS_PARSER_BUILD_TESTING OFF CACHE BOOL "Force DDS_PARSER_BUILD_TESTING to OFF" FORCE) + add_subdirectory(dds_parser) +else() + message(WARNING "dds_parser not found in ${CMAKE_CURRENT_SOURCE_DIR}/dds_parser, skipping!") + return() +endif() + add_definitions(${QT_DEFINITIONS}) add_definitions(-DQT_PLUGIN) -# if subdirectory not found, skip -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/dds_parser) - message(WARNING "dds_parser not found, skipping") - return() -endif() - -set(DDS_PARSER_BUILD_TESTING OFF) -add_subdirectory(dds_parser) add_library(ParserDDS SHARED idl_parser.cpp)