-add_definitions(
- -DQT_DISABLE_DEPRECATED_BEFORE=0x050f00
- -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
- -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055800
- -DKF_DEPRECATED_WARNINGS_SINCE=0x060000
-)
+# Compatibility with platforms without native fts (e.g. musl)
+check_include_files("sys/types.h;sys/stat.h;fts.h" HAVE_FTS_H)
+if(HAVE_FTS_H AND NOT HAIKU)
+ check_function_exists(fts_open HAVE_FTS_OPEN)
+ if(NOT HAVE_FTS_OPEN)
+ check_library_exists(fts fts_open "" HAVE_LIB_FTS)
+ endif()
+endif()
+
+if(HAVE_LIB_FTS)
+ set(FTS_LIB fts)
+else()
+ set(FTS_LIB "")
+endif()