Simple XML subset parser comparable to glib's Markup parser, but without any dependencies in one self contained file. Forked from https://github.com/ooxi/xml.c
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.

52 lines
802 B

  1. # Project setup
  2. project(xml C CXX)
  3. set(VERSION_MAJOR "0")
  4. set(VERSION_MINOR "2")
  5. set(VERSION_PATCH "0")
  6. cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
  7. # Define main library target
  8. add_library(xml STATIC "")
  9. # Compiler setup
  10. target_compile_options(
  11. xml
  12. PRIVATE
  13. -std=c11
  14. )
  15. # Options
  16. option(XML_PARSER_VERBOSE "Enable to be told everything the xml parser does" OFF)
  17. if(XML_PARSER_VERBOSE)
  18. target_compile_definitions(
  19. xml
  20. PRIVATE
  21. XML_PARSER_VERBOSE
  22. )
  23. endif(XML_PARSER_VERBOSE)
  24. # Sources
  25. target_sources(
  26. xml
  27. PRIVATE
  28. "${CMAKE_CURRENT_LIST_DIR}/src/xml.c"
  29. )
  30. target_include_directories(
  31. xml
  32. PUBLIC
  33. "${CMAKE_CURRENT_LIST_DIR}/src/"
  34. )
  35. # Build unit cases
  36. enable_testing()
  37. add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test")