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.

40 lines
691 B

  1. # Project setup
  2. PROJECT(xml)
  3. SET(VERSION_MAJOR "0")
  4. SET(VERSION_MINOR "1")
  5. SET(VERSION_PATCH "0")
  6. CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
  7. # Compiler setup
  8. SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG")
  9. SET(CMAKE_C_FLAGS_RELEASE "-O2")
  10. # Sources
  11. SET(SOURCE_DIRECTORY src)
  12. SET(TEST_SOURCE_DIRECTORY test)
  13. # Build library
  14. ADD_LIBRARY(xml STATIC
  15. ${SOURCE_DIRECTORY}/xml.c
  16. )
  17. # Build unit cases
  18. INCLUDE_DIRECTORIES(${SOURCE_DIRECTORY})
  19. ADD_EXECUTABLE(test-xml
  20. ${TEST_SOURCE_DIRECTORY}/test-xml
  21. )
  22. TARGET_LINK_LIBRARIES(test-xml xml)
  23. # Building example
  24. ADD_EXECUTABLE(example
  25. ${TEST_SOURCE_DIRECTORY}/example
  26. )
  27. TARGET_LINK_LIBRARIES(example xml)