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.

49 lines
894 B

  1. # Project setup
  2. PROJECT(xml)
  3. CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
  4. # Compiler setup
  5. SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG")
  6. SET(CMAKE_C_FLAGS_RELEASE "-O2")
  7. #IF (${CMAKE_BUILD_TYPE} strequal "Debug")
  8. # ADD_DEFINITIONS(-DDEBUG)
  9. #
  10. #ELSE (DEFINED ${DEBUG_BUILD})
  11. # SET(CMAKE_BUILD_TYPE ${CMAKE_C_FLAGS_RELEASE})
  12. #ENDIF (DEFINED ${DEBUG_BUILD})
  13. # Sources
  14. SET(SOURCE_DIRECTORY src)
  15. SET(TEST_SOURCE_DIRECTORY test)
  16. # Build library
  17. ADD_LIBRARY(xml STATIC
  18. ${SOURCE_DIRECTORY}/xml.c
  19. )
  20. # Build unit cases
  21. INCLUDE_DIRECTORIES(${SOURCE_DIRECTORY})
  22. ADD_EXECUTABLE(test-xml
  23. ${TEST_SOURCE_DIRECTORY}/test-xml
  24. )
  25. TARGET_LINK_LIBRARIES(test-xml xml)
  26. # Building example
  27. ADD_EXECUTABLE(example
  28. ${TEST_SOURCE_DIRECTORY}/example
  29. )
  30. TARGET_LINK_LIBRARIES(example xml)
  31. # Deploy
  32. #INSTALL(TARGETS xml DESTINATION lib)
  33. #INSTALL(FILES DESTINATION)