Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] make eCAL::proto part of ecal subfolder (ecal_core project) #1528

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,6 @@ if(WIN32)
set(CMAKE_RELWITHDEBINFO_POSTFIX reldbg)
endif()

# --------------------------------------------------------
# protobuf utilities
# --------------------------------------------------------
add_subdirectory(contrib/ecalproto)

# --------------------------------------------------------
# ecal app protobuf interface
# --------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions app/mon/mon_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ target_compile_definitions(${PROJECT_NAME}
create_targets_protobuf()

target_link_libraries(${PROJECT_NAME}
protobuf::libprotobuf
tclap::tclap
eCAL::core
eCAL::core_protobuf
eCAL::core_pb)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

Expand Down
3 changes: 1 addition & 2 deletions app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ create_targets_protobuf()
target_link_libraries (${PROJECT_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
eCAL::core
eCAL::proto
eCAL::core_protobuf
eCAL::app_pb
protobuf::libprotobuf
MonitorTreeView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "ui_plugin_widget.h"

#include <ecal/protobuf/ecal_proto_decoder.h>
#include <ecal/msg/protobuf/ecal_proto_decoder.h>
#include <protobuf_tree_builder.h>

class PluginWidget : public QWidget, public eCAL::mon::PluginWidgetInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <google/protobuf/message.h>
#include "monitor_tree_model.h"

#include <ecal/protobuf/ecal_proto_visitor.h>
#include <ecal/msg/protobuf/ecal_proto_visitor.h>
#include <stack>

class ProtobufTreeBuilder : public eCAL::protobuf::MessageVisitor
Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_plugins/signals_plotting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ target_link_libraries (${PROJECT_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
eCAL::core
eCAL::proto
eCAL::core_protobuf
eCAL::app_pb
protobuf::libprotobuf
eCAL::mon_plugin_lib
Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_plugins/signals_plotting/src/plugin_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#include "ui_plugin_widget.h"

#include <ecal/protobuf/ecal_proto_decoder.h>
#include <ecal/msg/protobuf/ecal_proto_decoder.h>
#include <protobuf_tree_builder.h>

class PluginWidget : public QWidget, public eCAL::mon::PluginWidgetInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <google/protobuf/message.h>
#include "signal_tree_model.h"

#include <ecal/protobuf/ecal_proto_visitor.h>
#include <ecal/msg/protobuf/ecal_proto_visitor.h>
#include <stack>

class ProtobufTreeBuilder : public eCAL::protobuf::MessageVisitor
Expand Down
3 changes: 1 addition & 2 deletions app/mon/mon_tui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ create_targets_protobuf()
target_link_libraries(${PROJECT_NAME}
protobuf::libprotobuf
tclap::tclap
eCAL::core
eCAL::core_protobuf
eCAL::core_pb
eCAL::proto
ftxui::screen
ftxui::dom
ftxui::component)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <stack>

#include <ecal/ecal.h>
#include <ecal/protobuf/ecal_proto_visitor.h>
#include <ecal/protobuf/ecal_proto_decoder.h>
#include <ecal/msg/protobuf/ecal_proto_visitor.h>
#include <ecal/msg/protobuf/ecal_proto_decoder.h>

#include <google/protobuf/message.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <ecal/msg/string/subscriber.h>

#include <ecal/msg/protobuf/dynamic_subscriber.h>
#include <ecal/protobuf/ecal_proto_decoder.h>
#include <ecal/msg/protobuf/ecal_proto_decoder.h>

#include "tui/viewmodel/message_visualization/message_visualization.hpp"

Expand Down
2 changes: 1 addition & 1 deletion app/play/play_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
Threads::Threads
spdlog::spdlog
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::app_pb
eCAL::ecaltime_pb
eCAL::measurement_hdf5
Expand Down
2 changes: 1 addition & 1 deletion app/rec/rec_client_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PUBLIC
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::core_pb
eCAL::app_pb
PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion app/rec/rec_server_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ target_link_libraries(${PROJECT_NAME}
PRIVATE
tinyxml2::tinyxml2
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::app_pb
ThreadingUtils
Threads::Threads
Expand Down
2 changes: 1 addition & 1 deletion app/sys/sys_client_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ target_link_libraries(${PROJECT_NAME}
spdlog::spdlog
tclap::tclap
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::core_pb
eCAL::app_pb
eCAL::sys_client_core
Expand Down
2 changes: 1 addition & 1 deletion app/sys/sys_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ target_link_libraries(${PROJECT_NAME}
tinyxml2::tinyxml2
spdlog::spdlog
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::core_pb
eCAL::app_pb
EcalParser
Expand Down
2 changes: 1 addition & 1 deletion contrib/ecaltime/simtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ecal_add_time_plugin(${PROJECT_NAME} SHARED ${ecal_time_simtime_src} ${ecal_time

target_compile_definitions(${PROJECT_NAME} PRIVATE ECAL_TIME_PLUGIN_API_EXPORT)

target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::core)
target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::core_protobuf)
target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::ecaltime_pb)

target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
Expand Down
2 changes: 1 addition & 1 deletion contrib/message/include/ecal/msg/proto/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#pragma warning(pop)
#endif

#include <ecal/protobuf/ecal_proto_hlp.h>
#include <ecal/msg/protobuf/ecal_proto_hlp.h>
#include <ecal/msg/message.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'ecal/msg/message.h' file not found [clang-diagnostic-error]

#include <ecal/msg/message.h>
         ^


namespace eCAL
Expand Down
4 changes: 2 additions & 2 deletions contrib/mma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ target_include_directories(${PROJECT_NAME}
create_targets_protobuf()

target_link_libraries(${PROJECT_NAME}
protobuf::libprotobuf
Threads::Threads
eCAL::core eCAL::app_pb
eCAL::core_protobuf
eCAL::app_pb
$<$<BOOL:${WIN32}>:Pdh>
$<$<BOOL:${WIN32}>:wbemuuid.lib>)

Expand Down
1 change: 1 addition & 0 deletions ecal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cmake_minimum_required(VERSION 3.13)
add_subdirectory(core)

if(ECAL_CORE_HAS_PROTOBUF)
add_subdirectory(msg/protobuf)
add_subdirectory(core_pb)
endif()

Expand Down
21 changes: 19 additions & 2 deletions ecal/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,6 @@ set(ecal_header_msg
include/ecal/msg/protobuf/client.h
include/ecal/msg/protobuf/dynamic_publisher.h
include/ecal/msg/protobuf/dynamic_subscriber.h
include/ecal/msg/protobuf/ecal_proto_dyn.h
include/ecal/msg/protobuf/ecal_proto_hlp.h
include/ecal/msg/protobuf/publisher.h
include/ecal/msg/protobuf/server.h
include/ecal/msg/protobuf/subscriber.h
Expand Down Expand Up @@ -732,3 +730,22 @@ if(UNIX)

set_property(TARGET ${PROJECT_NAME_PROCESS_STUB} PROPERTY FOLDER core)
endif(UNIX)

if(ECAL_CORE_HAS_PROTOBUF)
find_package(Protobuf REQUIRED)

add_library(core_protobuf INTERFACE)
add_library(eCAL::core_protobuf ALIAS core_protobuf)

target_link_libraries(core_protobuf
INTERFACE
eCAL::core
eCAL::proto
)

install(
TARGETS core_protobuf
EXPORT eCALCoreTargets
)

endif()
Loading
Loading