From 01f94b80cc3bcace5cdab38161f968e857cc2b2f Mon Sep 17 00:00:00 2001 From: eclipse-ecal-bot <111572016+eclipse-ecal-bot@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:05:17 +0100 Subject: [PATCH] [CP #1890 > support/v5.13] [core] Fixup build for Alpine (#1895) * Fixup build for Alpine (#1890) --------- Co-authored-by: DownerCase <119755054+DownerCase@users.noreply.github.com> Co-authored-by: Peguen <73380451+Peguen@users.noreply.github.com> --- ecal/core/src/ecal_process_stub.cpp | 7 +++---- lib/ecal_utils/CMakeLists.txt | 11 ++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ecal/core/src/ecal_process_stub.cpp b/ecal/core/src/ecal_process_stub.cpp index 1ad60f3fa2..8db1a64fa0 100644 --- a/ecal/core/src/ecal_process_stub.cpp +++ b/ecal/core/src/ecal_process_stub.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2019 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,7 @@ * ========================= eCAL LICENSE ================================= */ -#include -#include +#include #include #include #include @@ -39,7 +38,7 @@ int main(int argc, char** argv) } else if ((argc == 2) && (std::string(argv[1]) == "--version")) { - // POSIX wants us to provide some output when launching with --version. We also use this to determine the correctnis of this application from other applications. + // POSIX wants us to provide some output when launching with --version. We also use this to determine the correctness of this application from other applications. std::cout << ECAL_PROCESS_STUB_VERSION_STRING << std::endl; return EXIT_SUCCESS; } diff --git a/lib/ecal_utils/CMakeLists.txt b/lib/ecal_utils/CMakeLists.txt index 2f31c93c3c..d18606d65f 100644 --- a/lib/ecal_utils/CMakeLists.txt +++ b/lib/ecal_utils/CMakeLists.txt @@ -1,6 +1,6 @@ # ========================= eCAL LICENSE ================================= # -# Copyright (C) 2016 - 2019 Continental Corporation +# Copyright (C) 2016 - 2025 Continental Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -53,6 +53,15 @@ target_include_directories(${PROJECT_NAME} PUBLIC target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14) +# filesystem.cpp uses fts on Linux, some distibutions (i.e: Alpine) have fts as a +# separate library +if(LINUX) + find_library(libfts NAMES fts) + if(NOT "${libfts}" STREQUAL "libfts-NOTFOUND") + target_link_libraries(${PROJECT_NAME} PRIVATE "${libfts}") + endif() +endif() + # Create a source tree that mirrors the filesystem source_group(TREE "${CMAKE_CURRENT_LIST_DIR}" FILES