diff --git a/plotjuggler_plugins/DataStreamZMQ/cmake/FindZeroMQ.cmake b/cmake/FindZeroMQ.cmake similarity index 100% rename from plotjuggler_plugins/DataStreamZMQ/cmake/FindZeroMQ.cmake rename to cmake/FindZeroMQ.cmake diff --git a/plotjuggler_plugins/DataLoadMCAP/cmake/FindZstd.cmake b/cmake/FindZstd.cmake similarity index 100% rename from plotjuggler_plugins/DataLoadMCAP/cmake/FindZstd.cmake rename to cmake/FindZstd.cmake diff --git a/plotjuggler_plugins/DataLoadMCAP/CMakeLists.txt b/plotjuggler_plugins/DataLoadMCAP/CMakeLists.txt index dff7e935e..d5a728bf0 100644 --- a/plotjuggler_plugins/DataLoadMCAP/CMakeLists.txt +++ b/plotjuggler_plugins/DataLoadMCAP/CMakeLists.txt @@ -1,43 +1,33 @@ - if(BUILDING_WITH_CONAN) - find_package(zstd CONFIG REQUIRED) set(Zstd_LIBRARIES zstd::libzstd_static) set(Zstd_FOUND ON) - else() - - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") - find_package(Zstd QUIET) - + find_package(Zstd REQUIRED) endif() ########################################### -if(Zstd_FOUND) - - include_directories( ${Zstd_INCLUDE_DIRS} ) +add_definitions(${QT_DEFINITIONS}) +add_definitions(-DQT_PLUGIN) - add_definitions(${QT_DEFINITIONS}) - add_definitions(-DQT_PLUGIN) +QT5_WRAP_UI ( UI_SRC dialog_mcap.ui ) - QT5_WRAP_UI ( UI_SRC dialog_mcap.ui ) +SET( SRC + mcap.cpp + dataload_mcap.cpp + dialog_mcap.cpp +) - SET( SRC - mcap.cpp - dataload_mcap.cpp - dialog_mcap.cpp - ) +add_library(DataLoadMCAP SHARED ${SRC} ${UI_SRC} ) +target_include_directories(DataLoadMCAP PRIVATE + $ ) - add_library(DataLoadMCAP SHARED ${SRC} ${UI_SRC} ) - target_link_libraries(DataLoadMCAP - ${Qt5Widgets_LIBRARIES} - ${Qt5Xml_LIBRARIES} - ${Zstd_LIBRARIES} - lz4_static - plotjuggler_base ) +target_link_libraries(DataLoadMCAP + ${Qt5Widgets_LIBRARIES} + ${Qt5Xml_LIBRARIES} + ${Zstd_LIBRARIES} + lz4_static + plotjuggler_base ) - install(TARGETS DataLoadMCAP DESTINATION ${PJ_PLUGIN_INSTALL_DIRECTORY} ) +install(TARGETS DataLoadMCAP DESTINATION ${PJ_PLUGIN_INSTALL_DIRECTORY} ) -else() - message("MCAP dependencies (Zstd) not found") -endif() diff --git a/plotjuggler_plugins/DataLoadParquet/cmake/FindZstd.cmake b/plotjuggler_plugins/DataLoadParquet/cmake/FindZstd.cmake deleted file mode 100644 index eaba39746..000000000 --- a/plotjuggler_plugins/DataLoadParquet/cmake/FindZstd.cmake +++ /dev/null @@ -1,69 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -########################################################################### - -#[=======================================================================[.rst: -FindZstd ----------- - -Find the zstd library - -Result Variables -^^^^^^^^^^^^^^^^ - -``Zstd_FOUND`` - System has zstd -``Zstd_INCLUDE_DIRS`` - The zstd include directories. -``Zstd_LIBRARIES`` - The libraries needed to use zstd -#]=======================================================================] - -if(UNIX) - find_package(PkgConfig QUIET) - pkg_search_module(PC_Zstd libzstd) -endif() - -find_path(Zstd_INCLUDE_DIR zstd.h - HINTS - ${PC_Zstd_INCLUDEDIR} - ${PC_Zstd_INCLUDE_DIRS} -) - -find_library(Zstd_LIBRARY NAMES zstd - HINTS - ${PC_Zstd_LIBDIR} - ${PC_Zstd_LIBRARY_DIRS} -) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Zstd - REQUIRED_VARS - Zstd_LIBRARY - Zstd_INCLUDE_DIR -) - -if(Zstd_FOUND) - set(Zstd_LIBRARIES ${Zstd_LIBRARY}) - set(Zstd_INCLUDE_DIRS ${Zstd_INCLUDE_DIR}) -endif() - -mark_as_advanced(Zstd_INCLUDE_DIRS Zstd_LIBRARIES) diff --git a/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt b/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt index ead5ad3e9..cccd71168 100644 --- a/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt +++ b/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt @@ -4,7 +4,6 @@ elseif(BUILDING_WITH_CONAN) message(STATUS "Finding ZeroMQ with conan") else() message(STATUS "Finding ZeroMQ without package managers") - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") set(ZeroMQ_LIBS ${ZeroMQ_LIBRARIES}) endif()