-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from eclipse-ecal/integrate-core-pb
removed all ecal internal proto files duplicates
- Loading branch information
Showing
35 changed files
with
98 additions
and
1,160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# ========================= 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 ================================= | ||
|
||
project(core_pb) | ||
|
||
find_package(Protobuf REQUIRED) | ||
|
||
set(ProtoFiles | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ecal/core/pb/ecal.proto | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ecal/core/pb/host.proto | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ecal/core/pb/layer.proto | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ecal/core/pb/logging.proto | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ecal/core/pb/monitoring.proto | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ecal/core/pb/process.proto | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ecal/core/pb/service.proto | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ecal/core/pb/topic.proto | ||
) | ||
|
||
# Compile statically on Windows and shared for all other systems. | ||
# | ||
# We compile shared on Linux etc., as we must only load the proto descriptors | ||
# once; otherwise, protobuf would throw an exception on runtime. A shared object | ||
# achieves that, as it is only loaded into memory once, even when being linked | ||
# against from different libraries. | ||
# We don't have to do that on Windows, as we compile against protobuf statically | ||
# and therefore each .dll has it's own descriptor pool. Having a static lib here | ||
# also has the advantage that we need to export the symbols, which is default | ||
# disabled on Windows. | ||
# | ||
# TODO: Having code like that probably isn't the best solution ever. We should | ||
# maybe always link against protobuf statically. Currently the reason why we | ||
# don't do that is, that the default Ubuntu libprotobuf.a doesn't contain | ||
# position independent code and can therefore not be statically compiled into a | ||
# shared object library. | ||
if (WIN32) | ||
ecal_add_static_library(${PROJECT_NAME} src/core_pb.cpp) | ||
else() | ||
ecal_add_shared_library(${PROJECT_NAME} src/core_pb.cpp) | ||
endif() | ||
|
||
add_library(eCAL::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) | ||
|
||
protobuf_target_cpp(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/src INSTALL_FOLDER include ${ProtoFiles}) | ||
|
||
target_compile_options(${PROJECT_NAME} | ||
PRIVATE | ||
$<$<CXX_COMPILER_ID:MSVC>:/wd4505 /wd4592 /wd4189> | ||
$<$<CXX_COMPILER_ID:GNU>:-Wno-unused-parameter>) | ||
|
||
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
|
||
target_link_libraries(${PROJECT_NAME} protobuf::libprotobuf) | ||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14) | ||
|
||
ecal_install_library(${PROJECT_NAME}) | ||
|
||
if(BUILD_PY_BINDING) | ||
protobuf_generate_python_ext(python_sources ${PYTHON_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src ${ProtoFiles}) | ||
target_sources(${PROJECT_NAME} PRIVATE ${python_sources}) | ||
set_source_files_properties(${python_sources} PROPERTIES HEADER_FILE_ONLY TRUE) | ||
endif() | ||
|
||
set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER core) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// dummy file to force VS to create a library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
syntax = "proto3"; | ||
|
||
import "layer.proto"; | ||
import "ecal/core/pb/layer.proto"; | ||
|
||
package eCAL.pb; | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
samples/cpp/monitoring/monitoring_performance/src/protobuf/host.proto
This file was deleted.
Oops, something went wrong.
64 changes: 0 additions & 64 deletions
64
samples/cpp/monitoring/monitoring_performance/src/protobuf/layer.proto
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
samples/cpp/monitoring/monitoring_performance/src/protobuf/monitoring.proto
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.