CMakeLists.txt 904 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. project(librhash C)
  2. # Disable warnings to avoid changing 3rd party code.
  3. if(CMAKE_C_COMPILER_ID MATCHES
  4. "^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
  5. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
  6. elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
  7. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
  8. endif()
  9. set(librhash_sources
  10. librhash/algorithms.c
  11. librhash/algorithms.h
  12. librhash/byte_order.c
  13. librhash/byte_order.h
  14. librhash/hex.c
  15. librhash/hex.h
  16. librhash/md5.c
  17. librhash/md5.h
  18. librhash/rhash.c
  19. librhash/rhash.h
  20. librhash/sha1.c
  21. librhash/sha1.h
  22. librhash/sha256.c
  23. librhash/sha256.h
  24. librhash/sha3.c
  25. librhash/sha3.h
  26. librhash/sha512.c
  27. librhash/sha512.h
  28. librhash/ustd.h
  29. librhash/util.h
  30. )
  31. include_directories(
  32. ${KWSYS_HEADER_ROOT}
  33. )
  34. add_library(cmlibrhash ${librhash_sources})
  35. install(FILES COPYING README DESTINATION ${CMAKE_DOC_DIR}/cmlibrhash)