You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. --- a/src/CMakeLists.txt
  2. +++ b/src/CMakeLists.txt
  3. @@ -6,7 +6,7 @@ IF(NOT HAVE_GETOPT)
  4. ENDIF(NOT HAVE_GETOPT)
  5. ADD_EXECUTABLE(zipcmp zipcmp.c ${SRC_EXTRA_FILES})
  6. -TARGET_LINK_LIBRARIES(zipcmp zip)
  7. +TARGET_LINK_LIBRARIES(zipcmp zip ${FTS_LIB})
  8. INSTALL(TARGETS zipcmp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
  9. ADD_EXECUTABLE(zipmerge zipmerge.c ${SRC_EXTRA_FILES})
  10. --- a/CMakeLists.txt
  11. +++ b/CMakeLists.txt
  12. @@ -22,6 +22,7 @@ OPTION(BUILD_DOC "Build documentation" O
  13. INCLUDE(CheckFunctionExists)
  14. INCLUDE(CheckIncludeFiles)
  15. +INCLUDE(CheckLibraryExists)
  16. INCLUDE(CheckSymbolExists)
  17. INCLUDE(CheckTypeSize)
  18. INCLUDE(CheckCSourceRuns)
  19. @@ -158,6 +159,20 @@ CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTO
  20. CHECK_FUNCTION_EXISTS(strtoull HAVE_STRTOULL)
  21. CHECK_INCLUDE_FILES("sys/types.h;sys/stat.h;fts.h" HAVE_FTS_H)
  22. +# fts functions may be in external library
  23. +IF(HAVE_FTS_H)
  24. + CHECK_FUNCTION_EXISTS(fts_open HAVE_FTS_OPEN)
  25. + IF(NOT HAVE_FTS_OPEN)
  26. + CHECK_LIBRARY_EXISTS(fts fts_open "" HAVE_LIB_FTS)
  27. + ENDIF(NOT HAVE_FTS_OPEN)
  28. +ENDIF(HAVE_FTS_H)
  29. +
  30. +IF(HAVE_LIB_FTS)
  31. + SET(FTS_LIB fts)
  32. +ELSE()
  33. + SET(FTS_LIB "")
  34. +ENDIF()
  35. +
  36. CHECK_INCLUDE_FILES(stdbool.h HAVE_STDBOOL_H)
  37. CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
  38. CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)