cmake: improve fts variable handling

HAVE_LIB_FTS is used unconditionally, but there are paths through the
previous logic that result in this variable not being set (example:
HAVE_FTS_H is FALSE). This is not a big issue, but it's not nice either.

This commit adds ELSE() to set HAVE_LIB_FTS also for these paths.

Finally, this commit also sets up FTS_LIB as a proper cache variable
with type INTERNAL, to be in line with CHECK_FUNCTION_EXISTS and
CHECK_LIBRARY_EXISTS, which as well set cache variables of the same
type.

Tested with:

1. musl without musl-fts
2. musl with musl-fts
3. uclibc (includes fts support without extra libfts, like glibc)

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
1 file changed
tree: d904a887db12758ad41276c62adac2eb1a3deaff
  1. .github/
  2. android/
  3. developer-xcode/
  4. docs/
  5. examples/
  6. lib/
  7. man/
  8. regress/
  9. src/
  10. vstudio/
  11. .clang-format
  12. .gitattributes
  13. .gitignore
  14. .travis.yml
  15. API-CHANGES.md
  16. appveyor.yml
  17. AUTHORS
  18. cmake-config.h.in
  19. cmake-zipconf.h.in
  20. CMakeLists.txt
  21. create-cmake-config.h.in.pl
  22. FindNettle.cmake
  23. INSTALL.md
  24. libzip.pc.in
  25. LICENSE
  26. NEWS.md
  27. README.md
  28. THANKS
  29. TODO.md
README.md

This is libzip, a C library for reading, creating, and modifying zip archives. Files can be added from data buffers, files, or compressed data copied directly from other zip archives. Changes made without closing the archive can be reverted. Decryption and encryption of Winzip AES and decryption of legacy PKware encrypted files is supported. The API is documented by man pages.

libzip is fully documented via man pages. HTML versions of the man pages are on libzip.org and in the man directory. You can start with libzip(3), which lists all others. Example source code is in the examples and src subdirectories.

If you have developed an application using libzip, you can find out about API changes and how to adapt your code for them in the included file API-CHANGES.md.

See the INSTALL.md file for installation instructions and dependencies.

If you make a binary distribution, please include a pointer to the distribution site:

https://libzip.org/

The latest version can always be found there. The official repository is at github.

There is a mailing list for developers using libzip. You can subscribe to it by sending a mail with the subject “subscribe libzip-discuss” to minimalist at nih.at. List mail should be sent to libzip-discuss at nih.at. Use this for bug reports or questions.

If you want to reach the authors in private, use libzip@nih.at.

Travis Build Status Appveyor Build status Coverity Status