CMakeLists.txt 831 B

12345678910111213141516171819202122232425262728
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
  4. add_custom_target(proto ALL
  5. DEPENDS proto1.c
  6. proto1.h
  7. SOURCES
  8. ${test_SOURCE_DIR}/protolib/proto1.c.in
  9. ${test_SOURCE_DIR}/protolib/proto1.h.in
  10. COMMENT "Creating proto files")
  11. add_custom_command(
  12. OUTPUT proto1.c
  13. COMMAND ${CMAKE_COMMAND} -E copy
  14. ${test_SOURCE_DIR}/protolib/proto1.c.in proto1.c
  15. DEPENDS ${test_SOURCE_DIR}/protolib/proto1.c.in
  16. COMMENT "generate proto C files"
  17. )
  18. add_custom_command(
  19. OUTPUT proto1.h
  20. COMMAND ${CMAKE_COMMAND} -E copy
  21. ${test_SOURCE_DIR}/protolib/proto1.h.in proto1.h
  22. DEPENDS ${test_SOURCE_DIR}/protolib/proto1.h.in
  23. COMMENT "generate proto H files"
  24. )