From 56467d53474b9df4de33c98ca3830c95d901eeb6 Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Thu, 30 May 2019 23:01:06 +0200 Subject: [PATCH] Add support for musl-fts library # Conflicts: # CMakeLists.txt --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b80feb10..0874c7365 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,6 +245,20 @@ if( MSVC ) else() set( REL_LINKER_FLAGS "" ) set( ALL_C_FLAGS "-ffp-contract=off" ) + + if ( UNIX ) + check_symbol_exists( "fts_set" "fts.h" HAVE_FTS ) + if ( NOT HAVE_FTS ) + include ( FindPkgConfig ) + pkg_check_modules( MUSL_FTS musl-fts ) + if ( MUSL_FTS_FOUND ) + set ( ALL_C_FLAGS "${ALL_C_FLAGS} ${MUSL_FTS_LDFLAGS}" ) + else ( MUSL_FTS_FOUND ) + message (ERROR "fts_* functions not found in the system" ) + endif ( MUSL_FTS_FOUND ) + endif ( NOT HAVE_FTS ) + endif ( UNIX ) + set( REL_C_FLAGS "" ) set( DEB_C_FLAGS "" )