Skip to content
Open
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 .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
-DECAL_USE_NPCAP=OFF \
-DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON \
-DECAL_THIRDPARTY_BUILD_PROTOBUF=OFF \
-DECAL_THIRDPARTY_BUILD_ABSL=OFF \
-DECAL_THIRDPARTY_BUILD_SPDLOG=ON \
-DECAL_THIRDPARTY_BUILD_TINYXML2=ON \
-DECAL_THIRDPARTY_BUILD_FINEFTP=ON \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
-DECAL_INSTALL_SAMPLE_SOURCES=ON \
-DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON \
-DECAL_THIRDPARTY_BUILD_PROTOBUF=OFF \
-DECAL_THIRDPARTY_BUILD_ABSL=OFF \
-DECAL_THIRDPARTY_BUILD_SPDLOG=ON \
-DECAL_THIRDPARTY_BUILD_TINYXML2=ON \
-DECAL_THIRDPARTY_BUILD_FINEFTP=ON \
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
-DECAL_USE_NPCAP=ON ^
-DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON ^
-DECAL_THIRDPARTY_BUILD_PROTOBUF=ON ^
-DECAL_THIRDPARTY_BUILD_ABSL=ON ^
-DECAL_THIRDPARTY_BUILD_SPDLOG=ON ^
-DECAL_THIRDPARTY_BUILD_TINYXML2=ON ^
-DECAL_THIRDPARTY_BUILD_FINEFTP=OFF ^
Expand Down Expand Up @@ -165,6 +166,17 @@ jobs:
run: cmake --build . --config Debug
working-directory: ${{ runner.workspace }}/_build/sdk

- name: SDK Integration test
run: |
cmake --install "${{ runner.workspace }}/_build/sdk" --prefix "${{ runner.workspace }}/_install/sdk" --config Debug
cmake -G "Visual Studio 16 2019" -A x64 -T v142 ^
-S serialization/protobuf/samples/pubsub/person_loopback ^
-B _integration_test_build ^
-DCMAKE_CONFIGURATION_TYPES="Debug" ^
-DCMAKE_PREFIX_PATH="${{ runner.workspace }}/_install/sdk"
cmake --build _integration_test_build --config Debug
shell: cmd

- name: Build Release
run: cmake --build . --config Release
working-directory: ${{ runner.workspace }}/_build/complete
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@
[submodule "thirdparty/tsl-robin-map/tsl-robin-map"]
path = thirdparty/tsl-robin-map/tsl-robin-map
url = https://github.com/Tessil/robin-map.git
[submodule "thirdparty/absl"]
path = thirdparty/absl/absl
url = https://github.com/abseil/abseil-cpp.git
50 changes: 40 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,47 @@ file(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH)
message(STATUS "Module Path: ${CMAKE_MODULE_PATH}")
message(STATUS "Prefix Path: ${CMAKE_PREFIX_PATH}")

# --------------------------------------------------------
# detect qt library
# --------------------------------------------------------
if(MSVC)
if (ECAL_USE_QT)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QUIET)
if (NOT "${QT_FOUND}")
include("cmake/qt_msvc_path.cmake")
autodetect_qt_msvc_dir()
endif()
# -------
# Select C++ standard
# Abseil requires everything to be built with a consistent C++ standard.
# If abseil is built with C++14 but a component building with C++17 tries to use
# abseil (eg: via protobuf) there will be a mismatch and possibly a build failure.
# This is most prevalent with string_view where C++14 will use the abseil type
# but C++17 use std::string_view
# -------

# C++14 is the baseline required standard
set(_ECAL_CXX_STD 14)

# Some dependencies require C++17, which we must detect and push to everything
if(ECAL_USE_QT)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QUIET)
if(MSVC AND NOT "${QT_FOUND}")
include("cmake/qt_msvc_path.cmake")
autodetect_qt_msvc_dir()
endif()
if("${QT_VERSION_MAJOR}" VERSION_GREATER 5)
# QT6 has C++17 usage requirements
set(_ECAL_CXX_STD 17)
endif()
endif()
if(ECAL_USE_FTXUI)
# FTXUI requires C++17
set(_ECAL_CXX_STD 17)
endif()

if("${CMAKE_SOURCE_DIR}" STREQUAL "${eCAL_SOURCE_DIR}" AND NOT DEFINED CMAKE_CXX_STANDARD)
# eCAL is being compiled as the root project, and no standard version is set
set(CMAKE_CXX_STANDARD "${_ECAL_CXX_STD}")
message(STATUS "eCAL is using C++ ${_ECAL_CXX_STD}")
else()
# eCAL is part of a larger build or the standard was externally set
endif()

set(CMAKE_CXX_STANDARD_REQUIRED ON)
if("${CMAKE_CXX_STANDARD}" VERSION_LESS "${_ECAL_CXX_STD}")
message(FATAL_ERROR "eCAL requires CMAKE_CXX_STANDARD to be at least ${_ECAL_CXX_STD} (got: ${CMAKE_CXX_STANDARD})")
endif()

find_package(CMakeFunctions REQUIRED)

Expand Down Expand Up @@ -635,6 +664,7 @@ message(STATUS "ECAL_BUILD_TESTS : ${ECAL_BUI
message(STATUS "ECAL_INSTALL_SAMPLE_SOURCES : ${ECAL_INSTALL_SAMPLE_SOURCES}")
message(STATUS "ECAL_USE_NPCAP : ${ECAL_USE_NPCAP}")
message(STATUS "ECAL_THIRDPARTY_BUILD_ASIO : ${ECAL_THIRDPARTY_BUILD_ASIO}")
message(STATUS "ECAL_THIRDPARTY_BUILD_ABSL : ${ECAL_THIRDPARTY_BUILD_ABSL}")
message(STATUS "ECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS : ${ECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS}")
message(STATUS "ECAL_THIRDPARTY_BUILD_CURL : ${ECAL_THIRDPARTY_BUILD_CURL}")
message(STATUS "ECAL_THIRDPARTY_BUILD_FINEFTP : ${ECAL_THIRDPARTY_BUILD_FINEFTP}")
Expand Down
9 changes: 9 additions & 0 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ yaml-cpp
- Binary distributions for Windows
- Binary distributions for Linux

abseil
- License: Apache 2.0
- Project: https://github.com/abseil/abseil-cpp
- Copyright: 2017 The Abseil Authors.
- Included in:
- Git submodule `/thirdparty/absl/absl`
- Binary distributions for Windows
- Binary distributions for Linux

## Cryptography

Content may contain encryption software. The country in which you are currently
Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
eCAL::protobuf_core
eCAL::string_core
eCAL::core_pb)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

ecal_install_app(${PROJECT_NAME})

Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ target_link_libraries (${PROJECT_NAME} PRIVATE
MonitorTreeView
eCAL::mon_plugin_lib
)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

if(MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4127 /wd4714")
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 @@ -84,7 +84,7 @@ target_link_libraries (${PROJECT_NAME} PRIVATE
CustomQt
)

target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

if(MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4127 /wd4714" )
Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_tui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
ftxui::dom
ftxui::component)

target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

ecal_install_app(${PROJECT_NAME})

Expand Down
2 changes: 1 addition & 1 deletion app/util/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# ========================= eCAL LICENSE =================================

project(config)
project(ecal_config)

set(ecalconfig_src
src/ecal_config.cpp
Expand Down
3 changes: 2 additions & 1 deletion cmake/submodule_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.24)
set(ecal_submodule_dependency_provider_root_dir ${CMAKE_CURRENT_LIST_DIR})

set(ecal_submodule_dependencies
absl
asio
CMakeFunctions
CURL
Expand Down Expand Up @@ -72,4 +73,4 @@ endmacro()
cmake_language(
SET_DEPENDENCY_PROVIDER ecal_dependencies_provider
SUPPORTED_METHODS FIND_PACKAGE
)
)
2 changes: 0 additions & 2 deletions cpack/innosetup/ecal_setup.iss.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,13 @@ Source: "{#ComponentStagingDir}\libprotobuf-lite\*"; DestDir: "{app}";
Source: "{#ComponentStagingDir}\libprotoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#ComponentStagingDir}\protobuf-export\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#ComponentStagingDir}\protobuf-headers\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#ComponentStagingDir}\protobuf-protos\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#ComponentStagingDir}\protoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf

Source: "{#DebugSdkStagingDir}\libprotobuf\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#DebugSdkStagingDir}\libprotobuf-lite\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#DebugSdkStagingDir}\libprotoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#DebugSdkStagingDir}\protobuf-export\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
;Source: "{#DebugSdkStagingDir}\protobuf-headers\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
;Source: "{#DebugSdkStagingDir}\protobuf-protos\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
; Source: "{#DebugSdkStagingDir}\protoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf

; sdk\hdf5
Expand Down
2 changes: 1 addition & 1 deletion ecal/samples/cpp/benchmarks/perftool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE

target_include_directories(${PROJECT_NAME} PRIVATE src)

target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

source_group(TREE "${CMAKE_CURRENT_LIST_DIR}"
FILES
Expand Down
2 changes: 1 addition & 1 deletion ecal/samples/cpp/misc/time/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

cmake_minimum_required(VERSION 3.15)

project(time)
project(ecal_time)

find_package(eCAL REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ target_link_libraries(${PROJECT_NAME}
eCAL::protobuf_core
)

target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

ecal_install_sample(${PROJECT_NAME})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ target_link_libraries(${PROJECT_NAME}
eCAL::protobuf_core
)

target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

ecal_install_sample(${PROJECT_NAME})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ target_link_libraries(${PROJECT_NAME}
eCAL::protobuf_core
)

target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

ecal_install_sample(${PROJECT_NAME})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ target_link_libraries(${PROJECT_NAME}
)


target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

ecal_install_gtest(${PROJECT_NAME})

Expand Down
1 change: 1 addition & 0 deletions thirdparty/absl/absl
Submodule absl added at d9e495
9 changes: 9 additions & 0 deletions thirdparty/absl/build-absl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include_guard(GLOBAL)

# Copied out of protobuf/cmake/abseil-cpp.cmake
if(protobuf_INSTALL)
# When protobuf_INSTALL is enabled and Abseil will be built as a module,
# Abseil will be installed along with protobuf for convenience.
set(ABSL_ENABLE_INSTALL ON)
endif()
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/absl" "${eCAL_BINARY_DIR}thirdparty/absl" SYSTEM)
20 changes: 12 additions & 8 deletions thirdparty/protobuf/build-protobuf.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Protobuf 4(.25.X) is skipped because of a regression with msvc that never
# had its fix backported.
# https://github.com/protocolbuffers/protobuf/issues/14602
set(Protobuf_PROTOC_EXECUTABLE protoc)
set(Protobuf_VERSION 3.11.4)
set(Protobuf_VERSION_MAJOR 3)
set(Protobuf_VERSION_MINOR 11)
set(Protobuf_VERSION_PATCH 4)
set(Protobuf_VERSION 5.29.5)
set(Protobuf_VERSION_MAJOR 5)
set(Protobuf_VERSION_MINOR 29)
set(Protobuf_VERSION_PATCH 5)

include_guard(GLOBAL)

Expand All @@ -12,6 +15,10 @@ if(UNIX)
set(protobuf_BUILD_SHARED_LIBS ON CACHE BOOL "My option" FORCE)
endif()

set(protobuf_BUILD_LIBUPB OFF CACHE BOOL "libupb is disabled" FORCE)
set(protobuf_USE_EXTERNAL_GTEST ON CACHE BOOL "Do not use protobuf vendored gtest" FORCE)
set(protobuf_ABSL_PROVIDER "package")

if(MSVC)
message(STATUS "supress thirdparty warnings for windows platform ..")
set(CMAKE_CXX_FLAGS_OLD "${CMAKE_CXX_FLAGS}")
Expand All @@ -23,10 +30,7 @@ if(MSVC)
endif()

ecal_disable_all_warnings()
ecal_variable_push(CMAKE_POLICY_VERSION_MINIMUM)
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/protobuf/cmake" "${eCAL_BINARY_DIR}/thirdparty/protobuf" SYSTEM)
ecal_variable_pop(CMAKE_POLICY_VERSION_MINIMUM)
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/protobuf" "${eCAL_BINARY_DIR}/thirdparty/protobuf" SYSTEM)
ecal_restore_warning_level()

if (NOT TARGET protobuf::libprotobuf)
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/protobuf/protobuf
Submodule protobuf updated 3854 files
Loading