CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. add_library(renderers SHARED)
  2. ## TODO: move svg_renderer to proper subdir
  3. ## for some reason it doesn't work to simply link renderers with svg_renderer:
  4. ## when installed, librenderers.so cannot find libsvg_renderer.so...
  5. set(BUILD_SVG_RENDERER_MODULES ON CACHE BOOL "Whether to build actual SVG renderer modules (useful to turn off to just run basic tests)")
  6. target_sources(renderers
  7. PRIVATE
  8. svg_renderer/svg_renderer.cpp
  9. svg_renderer/svg_module.h
  10. svg_renderer/shape.h
  11. )
  12. if (BUILD_SVG_RENDERER_MODULES)
  13. target_sources(renderers
  14. PRIVATE
  15. svg_renderer/empty.cpp
  16. svg_renderer/image.cpp
  17. svg_renderer/text.cpp
  18. svg_renderer/transform.cpp
  19. svg_renderer/composite.cpp
  20. svg_renderer/render_shape.cpp
  21. svg_renderer/shapes.cpp
  22. )
  23. endif()
  24. if (NOT TARGET time)
  25. find_package(time REQUIRED)
  26. endif()
  27. target_link_libraries(renderers
  28. document
  29. time
  30. geom_helpers
  31. boost_system
  32. boost_filesystem
  33. )
  34. install(
  35. TARGETS renderers
  36. EXPORT rainynite_core
  37. LIBRARY DESTINATION lib
  38. ARCHIVE DESTINATION lib
  39. )