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

Core: Fix Flatbuffer build. #1133

Merged
merged 2 commits into from
Jun 29, 2023
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ message(STATUS "HAS_HDF5 : ${HAS_HDF5}")
message(STATUS "HAS_QT5 : ${HAS_QT5}")
message(STATUS "HAS_CURL : ${HAS_CURL}")
message(STATUS "HAS_CAPNPROTO : ${HAS_CAPNPROTO}")
message(STATUS "HAS_FLATBUFFERS : ${HAS_FLATBUFFERS}")
message(STATUS "HAS_FTXUI : ${HAS_FTXUI}")
message(STATUS "BUILD_DOCS : ${BUILD_DOCS}")
message(STATUS "BUILD_APPS : ${BUILD_APPS}")
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/msg/flatbuffers/publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace eCAL
**/
bool Create(const std::string& topic_name_)
{
return(CMsgPublisher<T>::Create(topic_name_, GetTypeName(), GetDescription()));
return(CMsgPublisher<T>::Create(topic_name_, GetTopicInformation()));
}

private:
Expand Down
48 changes: 48 additions & 0 deletions samples/cpp/pubsub/flatbuffer/monster_rec/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ========================= eCAL LICENSE =================================
#
# Copyright (C) 2016 - 2019 Continental Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ========================= eCAL LICENSE =================================

cmake_minimum_required(VERSION 3.10)

set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)

project(monster_rec)

find_package(FlatBuffers REQUIRED)
find_package(eCAL REQUIRED)


ecal_add_sample(${PROJECT_NAME} monster_rec.cpp)

flatbuffers_generate_headers(
TARGET monster_rec_flatbuffers
INCLUDE_PREFIX monster
SCHEMAS monster/monster.fbs
#BINARY_SCHEMAS_DIR "${MY_BINARY_SCHEMA_DIRECTORY}"
FLAGS --gen-object-api
)

target_link_libraries(${PROJECT_NAME}
PRIVATE
monster_rec_flatbuffers
flatbuffers::flatbuffers
eCAL::core
)

ecal_install_sample(${PROJECT_NAME})

set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER samples/cpp/monster)
48 changes: 48 additions & 0 deletions samples/cpp/pubsub/flatbuffer/monster_snd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ========================= eCAL LICENSE =================================
#
# Copyright (C) 2016 - 2019 Continental Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ========================= eCAL LICENSE =================================

cmake_minimum_required(VERSION 3.10)

set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)

project(monster_snd)

find_package(FlatBuffers REQUIRED)
find_package(eCAL REQUIRED)


ecal_add_sample(${PROJECT_NAME} monster_snd.cpp)

flatbuffers_generate_headers(
TARGET monster_snd_flatbuffers
INCLUDE_PREFIX monster
SCHEMAS monster/monster.fbs
#BINARY_SCHEMAS_DIR "${MY_BINARY_SCHEMA_DIRECTORY}"
FLAGS --gen-object-api
)

target_link_libraries(${PROJECT_NAME}
PRIVATE
monster_snd_flatbuffers
flatbuffers::flatbuffers
eCAL::core
)

ecal_install_sample(${PROJECT_NAME})

set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER samples/cpp/monster)
Loading