Skip to content

Commit

Permalink
Fixup build for Alpine (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
DownerCase authored Jan 13, 2025
1 parent 74b5dc1 commit 3b22b6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions ecal/core/src/ecal_process_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

#include <errno.h>
#include <fcntl.h>
#include <string>
#include <sys/file.h>
#include <sys/stat.h>
Expand Down
9 changes: 9 additions & 0 deletions lib/ecal_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b22b6e

Please sign in to comment.