From 7bc1df3a6f21231df230d461b0e953bf782e266a Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Thu, 19 Dec 2024 12:09:47 +0100 Subject: [PATCH 1/2] Fix static building Fast-CDR with mingw This patch is equivalent to the one submitted upstream as https://github.com/eProsima/Fast-CDR/pull/259 --- .../rosx_introspection/3rdparty/Fast-CDR/src/cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotjuggler_plugins/ParserROS/rosx_introspection/3rdparty/Fast-CDR/src/cpp/CMakeLists.txt b/plotjuggler_plugins/ParserROS/rosx_introspection/3rdparty/Fast-CDR/src/cpp/CMakeLists.txt index 7ac643b6f..6ec6a4919 100644 --- a/plotjuggler_plugins/ParserROS/rosx_introspection/3rdparty/Fast-CDR/src/cpp/CMakeLists.txt +++ b/plotjuggler_plugins/ParserROS/rosx_introspection/3rdparty/Fast-CDR/src/cpp/CMakeLists.txt @@ -32,7 +32,7 @@ set(${PROJECT_NAME}_source_files exceptions/Exception.cpp exceptions/LockedExternalAccessException.cpp exceptions/NotEnoughMemoryException.cpp - FastCdr.rc + $<$,SHARED_LIBRARY>:FastCdr.rc> ) configure_file(${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/config.h.in From fc53960ca4529c7111b7dc9f26ae955bca7e1dc8 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Thu, 19 Dec 2024 12:44:11 +0100 Subject: [PATCH 2/2] [RFC] Allow for linking the PJ executable statically --- plotjuggler_app/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plotjuggler_app/CMakeLists.txt b/plotjuggler_app/CMakeLists.txt index cd4ac32f1..45410e099 100644 --- a/plotjuggler_app/CMakeLists.txt +++ b/plotjuggler_app/CMakeLists.txt @@ -1,3 +1,4 @@ +option(EXE_STATIC "Link the PlotJuggler binary statically" OFF) set (CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -119,7 +120,8 @@ target_link_libraries(plotjuggler plotjuggler_base plotjuggler_qwt QCodeEditor - ) + $<$:-static-libgcc -static-libstdc++ -static> +) if(COMPILING_WITH_CATKIN)