aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: 100bf285da60b923e1ee69f892f489f9a56f8417 (plain)
  1. set(PROGRAM_cmark "cmark")
  2. set(PROGRAM_cmark_SOURCES blocks.c
  3. inlines.c
  4. main.c
  5. debug.h
  6. getopt.c
  7. print.c
  8. scanners.h
  9. scanners.c
  10. scanners.re
  11. cmark.h
  12. utf8.h utf8.c
  13. buffer.h buffer.c
  14. references.h references.c
  15. html/html.c
  16. html/html_unescape.h
  17. html/html_unescape.gperf
  18. html/houdini.h
  19. html/houdini_href_e.c
  20. html/houdini_html_e.c
  21. html/houdini_html_u.c
  22. )
  23. include_directories(. html)
  24. if (MSVC)
  25. file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} DOS_CURRENT_SOURCE_DIR)
  26. add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c
  27. DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re
  28. COMMAND ${RE2C} --case-insensitive -b -i ${DOS_CURRENT_SOURCE_DIR}\\scanners.re >${DOS_CURRENT_SOURCE_DIR}\\scanners.c)
  29. else(MSVC)
  30. add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c
  31. DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re
  32. COMMAND ${RE2C} --case-insensitive -b -i ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re >${CMAKE_CURRENT_SOURCE_DIR}/scanners.c)
  33. endif(MSVC)
  34. add_executable(${PROGRAM_cmark}
  35. ${PROGRAM_cmark_SOURCES})
  36. if (MSVC)
  37. set_property(TARGET ${PROGRAM_cmark}
  38. APPEND PROPERTY LINK_FLAGS /INCREMENTAL:NO)
  39. # if sometimes libs are needed ...
  40. #target_link_libraries(${PROGRAM_chronolog})
  41. endif(MSVC)
  42. install(TARGETS ${PROGRAM_cmark}
  43. RUNTIME DESTINATION bin
  44. BUNDLE DESTINATION /Applications)