CMakeLists.txt 821 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. if(MSVC)
  2. # disable security warnings for fopen()
  3. add_definitions(/D _CRT_SECURE_NO_WARNINGS)
  4. endif()
  5. add_executable(bee2cmd
  6. bsum/bsum.c
  7. core/cmd_arg.c
  8. core/cmd_cvc.c
  9. core/cmd_date.c
  10. core/cmd_file.c
  11. core/cmd_print.c
  12. core/cmd_privkey.c
  13. core/cmd_pwd.c
  14. core/cmd_rng.c
  15. core/cmd_sig.c
  16. core/cmd_term.c
  17. core/whereami.c
  18. csr/csr.c
  19. cvc/cvc.c
  20. cvr/cvr.c
  21. es/es.c
  22. kg/kg.c
  23. pwd/pwd.c
  24. sig/sig.c
  25. ver/ver.c
  26. cmd_main.c
  27. )
  28. # CMake does not set MINGW in MSys2[MinGW] environment
  29. if(WIN32 OR MINGW OR ${CMAKE_C_PLATFORM_ID} STREQUAL MinGW)
  30. target_sources(bee2cmd
  31. PRIVATE stamp/stamp.c
  32. )
  33. endif()
  34. target_link_libraries(bee2cmd bee2_static)
  35. install(TARGETS bee2cmd
  36. DESTINATION ${BIN_INSTALL_DIR}
  37. PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)