aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: 203e5bf9dc27c535a0069a0dd71ea5c640c108c7 (plain)
  1. set(PROGRAM_stmd "stmd")
  2. set(PROGRAM_stmd_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. stmd.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_stmd}
  35. ${PROGRAM_stmd_SOURCES})
  36. if (MSVC)
  37. set_property(TARGET ${PROGRAM_stmd}
  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_stmd}
  43. RUNTIME DESTINATION bin
  44. BUNDLE DESTINATION /Applications)