CMakeLists.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. set(YAML_HEADERS
  2. "yaml.h"
  3. "traits.h"
  4. "stlemitter.h"
  5. "parser.h"
  6. "ostream_wrapper.h"
  7. "null.h"
  8. "noncopyable.h"
  9. "noexcept.h"
  10. "mark.h"
  11. "exceptions.h"
  12. "eventhandler.h"
  13. "emitterstyle.h"
  14. "emittermanip.h"
  15. "emitter.h"
  16. "emitterdef.h"
  17. "emitfromevents.h"
  18. "dll.h"
  19. "depthguard.h"
  20. "binary.h"
  21. "anchor.h"
  22. "node/type.h"
  23. "node/ptr.h"
  24. "node/parse.h"
  25. "node/node.h"
  26. "node/iterator.h"
  27. "node/impl.h"
  28. "node/emit.h"
  29. "node/convert.h"
  30. "contrib/graphbuilder.h"
  31. "contrib/anchordict.h"
  32. )
  33. list(TRANSFORM YAML_HEADERS PREPEND "include/yaml-cpp/")
  34. set(YAML_SOURCES
  35. "binary.cpp"
  36. "convert.cpp"
  37. "depthguard.cpp"
  38. "directives.cpp"
  39. "emit.cpp"
  40. "emitfromevents.cpp"
  41. "emitter.cpp"
  42. "emitterstate.cpp"
  43. "emitterutils.cpp"
  44. "exceptions.cpp"
  45. "exp.cpp"
  46. "memory.cpp"
  47. "nodebuilder.cpp"
  48. "node.cpp"
  49. "node_data.cpp"
  50. "nodeevents.cpp"
  51. "null.cpp"
  52. "ostream_wrapper.cpp"
  53. "parse.cpp"
  54. "parser.cpp"
  55. "regex_yaml.cpp"
  56. "scanner.cpp"
  57. "scanscalar.cpp"
  58. "scantag.cpp"
  59. "scantoken.cpp"
  60. "simplekey.cpp"
  61. "singledocparser.cpp"
  62. "stream.cpp"
  63. "tag.cpp"
  64. "contrib/graphbuilderadapter.cpp"
  65. "contrib/graphbuilder.cpp"
  66. )
  67. list(TRANSFORM YAML_SOURCES PREPEND "src/")
  68. add_library(yaml-cpp STATIC EXCLUDE_FROM_ALL ${YAML_SOURCES})
  69. target_include_directories(yaml-cpp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
  70. target_compile_definitions(yaml-cpp PUBLIC "-DYAML_CPP_STATIC_DEFINE")
  71. if(WIN32)
  72. set_target_properties(yaml-cpp PROPERTIES FOLDER "3rdparty")
  73. endif()