PROJECT(graphviz)
-SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake
+SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(plugin)
## Process this file with cmake to produce Makefile
INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/lib/cdt
)
-
-########### next target ###############
-
ADD_CUSTOM_COMMAND(
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT grammar.c
- OUTPUT grammar.h
- DEPENDS grammar.y
- COMMAND yacc -dv grammar.y
- COMMAND sed "s/yy/aag/g" < y.tab.c > grammar.c
- COMMAND sed "s/yy/aag/g" < y.tab.h > grammar.h
- COMMAND rm y.tab.c y.tab.h y.output
+ OUTPUT agraph.pdf
+ DEPENDS agraph.3
+ COMMAND groff -Tps -man agraph.3 | ps2pdf - agraph.pdf
)
-ADD_CUSTOM_COMMAND(
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT scan.c
- DEPENDS scan.l
- COMMAND flex -i scan.l
- COMMAND sed "s/yy/aag/g" < lex.yy.c > scan.c
- COMMAND rm lex.yy.c
-)
+ADD_DEFINITIONS(-DVERSION='"1.0"')
-SET(agraph_SRCS
- agerror.c
- apply.c
- attr.c
- edge.c
- flatten.c
- grammar.c
- graph.c
- id.c
- imap.c
- io.c
- mem.c
- node.c
- obj.c
- pend.c
- rec.c
- refstr.c
- scan.c
- subg.c
- utils.c
- write.c
-)
+########### next target ###############
-ADD_LIBRARY(agraph STATIC ${agraph_SRCS})
+INCLUDE(${CMAKE_SOURCE_DIR}/lib/agraph/sources.cmake)
+ADD_LIBRARY(agraph STATIC ${agraph_SRCS})
########### install files ###############
--- /dev/null
+# $Id$ $Revision$
+
+SET(agraph_SRCDIR ${CMAKE_SOURCE_DIR}/lib/agraph)
+
+INCLUDE_DIRECTORIES(${agraph_SRCDIR})
+
+ADD_CUSTOM_COMMAND(
+ WORKING_DIRECTORY ${agraph_SRCDIR}
+ OUTPUT grammar.c
+ OUTPUT grammar.h
+ DEPENDS grammar.y
+ COMMAND yacc -dv grammar.y
+ COMMAND sed "s/yy/aag/g" < y.tab.c > grammar.c
+ COMMAND sed "s/yy/aag/g" < y.tab.h > grammar.h
+ COMMAND rm y.tab.c y.tab.h y.output
+)
+
+ADD_CUSTOM_COMMAND(
+ WORKING_DIRECTORY ${agraph_SRCDIR}
+ OUTPUT scan.c
+ DEPENDS scan.l
+ COMMAND flex -i scan.l
+ COMMAND sed "s/yy/aag/g" < lex.yy.c > scan.c
+ COMMAND rm lex.yy.c
+)
+
+SET(agraph_SRCS
+ ${agraph_SRCDIR}/agerror.c
+ ${agraph_SRCDIR}/apply.c
+ ${agraph_SRCDIR}/attr.c
+ ${agraph_SRCDIR}/edge.c
+ ${agraph_SRCDIR}/flatten.c
+ ${agraph_SRCDIR}/grammar.c
+ ${agraph_SRCDIR}/graph.c
+ ${agraph_SRCDIR}/id.c
+ ${agraph_SRCDIR}/imap.c
+ ${agraph_SRCDIR}/io.c
+ ${agraph_SRCDIR}/mem.c
+ ${agraph_SRCDIR}/node.c
+ ${agraph_SRCDIR}/obj.c
+ ${agraph_SRCDIR}/pend.c
+ ${agraph_SRCDIR}/rec.c
+ ${agraph_SRCDIR}/refstr.c
+ ${agraph_SRCDIR}/scan.c
+ ${agraph_SRCDIR}/subg.c
+ ${agraph_SRCDIR}/utils.c
+ ${agraph_SRCDIR}/write.c
+)
## Process this file with cmake to produce Makefile
INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/lib/agraph
${CMAKE_SOURCE_DIR}/lib/cdt
)
-
########### next target ###############
-SET(agutil_SRCS
- dynattr.c
- nodeq.c
-)
+INCLUDE(${CMAKE_SOURCE_DIR}/lib/agutil/sources.cmake)
ADD_LIBRARY(agutil STATIC ${agutil_SRCS})
--- /dev/null
+# $Id$ $Revision$
+
+SET(agutil_SRCDIR ${CMAKE_SOURCE_DIR}/lib/agutil)
+
+INCLUDE_DIRECTORIES(${agutil_SRCDIR})
+
+SET(agutil_SRCS
+ ${agutil_SRCDIR}/dynattr.c
+ ${agutil_SRCDIR}/nodeq.c
+)
## Process this file with cmake to produce Makefile
INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
)
+ADD_CUSTOM_COMMAND(
+ OUTPUT cdt.pdf
+ DEPENDS cdt.3
+ COMMAND groff -Tps -man cdt.3 | ps2pdf - cdt.pdf
+)
+
########### next target ###############
-SET(cdt_SRCS
- dtclose.c
- dtdisc.c
- dtextract.c
- dtflatten.c
- dthash.c
- dtlist.c
- dtmethod.c
- dtopen.c
- dtrenew.c
- dtrestore.c
- dtsize.c
- dtstat.c
- dtstrhash.c
- dttree.c
- dtview.c
- dtwalk.c
-)
+INCLUDE(${CMAKE_SOURCE_DIR}/lib/cdt/sources.cmake)
ADD_LIBRARY(cdt STATIC ${cdt_SRCS})
-
########### install files ###############
INSTALL_FILES(FILES
--- /dev/null
+# $Id$ $Revision$
+
+SET(cdt_SRCDIR ${CMAKE_SOURCE_DIR}/lib/cdt)
+
+INCLUDE_DIRECTORIES(${cdt_SRCDIR})
+
+SET(cdt_SRCS
+ ${cdt_SRCDIR}/dtclose.c
+ ${cdt_SRCDIR}/dtdisc.c
+ ${cdt_SRCDIR}/dtextract.c
+ ${cdt_SRCDIR}/dtflatten.c
+ ${cdt_SRCDIR}/dthash.c
+ ${cdt_SRCDIR}/dtlist.c
+ ${cdt_SRCDIR}/dtmethod.c
+ ${cdt_SRCDIR}/dtopen.c
+ ${cdt_SRCDIR}/dtrenew.c
+ ${cdt_SRCDIR}/dtrestore.c
+ ${cdt_SRCDIR}/dtsize.c
+ ${cdt_SRCDIR}/dtstat.c
+ ${cdt_SRCDIR}/dtstrhash.c
+ ${cdt_SRCDIR}/dttree.c
+ ${cdt_SRCDIR}/dtview.c
+ ${cdt_SRCDIR}/dtwalk.c
+)
## Process this file with cmake to produce Makefile
INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/lib/gvc
${CMAKE_SOURCE_DIR}/lib/pack
${CMAKE_SOURCE_DIR}/lib/gd
)
-
########### next target ###############
-SET(common_SRCS
- arrows.c
- colxlate.c
- fontmetrics.c
- args.c
- memory.c
- globals.c
- htmllex.c
- htmltable.c
- input.c
- pointset.c
- postproc.c
- routespl.c
- splines.c
- psusershape.c
- timing.c
- labels.c
- ns.c
- shapes.c
- utils.c
- geom.c
- output.c
- emit.c
-)
-
-SET(codegen_SRCS
- diagen.c
- figgen.c
- gdgen.c
- hpglgen.c
- mapgen.c
- mifgen.c
- mpgen.c
- picgen.c
- psgen.c
- svggen.c
- vrmlgen.c
- vtxgen.c
- xdgen.c
-)
-
-set(generated_SRCS
- colortbl.h
- htmlparse.h
- htmlparse.c
- ps.h
-)
+INCLUDE(${CMAKE_SOURCE_DIR}/lib/common/sources.cmake)
ADD_LIBRARY(common STATIC ${generated_SRCS} ${common_SRCS} ${codegen_SRCS} )
-ADD_CUSTOM_COMMAND(
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT htmlparse.c
- OUTPUT htmlparse.h
- DEPENDS htmlparse.y
- COMMAND yacc -dv htmlparse.y
- COMMAND sed "s/yy/html/g" < y.tab.c > htmlparse.c
- COMMAND sed "s/yy/html/g" < y.tab.h > htmlparse.h
- COMMAND rm y.tab.c y.tab.h y.output
-)
-
-ADD_CUSTOM_COMMAND(
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT ps.h
- DEPENDS ps.txt
- COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/stringize.awk ps.txt > ps.h
-)
-
-ADD_CUSTOM_COMMAND(
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT colortbl.h
- DEPENDS color_names
- DEPENDS brewer_colors
- COMMAND LC_COLLATE=C sort color_names > color_lib
- COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/brewer.awk brewer_colors >> color_lib
- COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/colortbl.awk color_lib > colortbl.h
- COMMAND rm color_lib
-)
-
########### install files ###############
--- /dev/null
+# $Id$ $Revision$
+
+SET(common_SRCDIR ${CMAKE_SOURCE_DIR}/lib/common)
+
+INCLUDE_DIRECTORIES(${common_SRCDIR})
+
+ADD_CUSTOM_COMMAND(
+ WORKING_DIRECTORY ${common_SRCDIR}
+ OUTPUT htmlparse.c
+ OUTPUT htmlparse.h
+ DEPENDS htmlparse.y
+ COMMAND yacc -dv htmlparse.y
+ COMMAND sed "s/yy/html/g" < y.tab.c > htmlparse.c
+ COMMAND sed "s/yy/html/g" < y.tab.h > htmlparse.h
+ COMMAND rm y.tab.c y.tab.h y.output
+)
+
+ADD_CUSTOM_COMMAND(
+ WORKING_DIRECTORY ${common_SRCDIR}
+ OUTPUT ps.h
+ DEPENDS ps.txt
+ COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/stringize.awk ps.txt > ps.h
+)
+
+ADD_CUSTOM_COMMAND(
+ WORKING_DIRECTORY ${common_SRCDIR}
+ OUTPUT colortbl.h
+ DEPENDS color_names
+ DEPENDS brewer_colors
+ COMMAND LC_COLLATE=C sort color_names > color_lib
+ COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/brewer.awk brewer_colors >> color_lib
+ COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/colortbl.awk color_lib > colortbl.h
+ COMMAND rm color_lib
+)
+
+SET(common_base_SRCS
+ ${common_SRCDIR}/arrows.c
+ ${common_SRCDIR}/colxlate.c
+ ${common_SRCDIR}/fontmetrics.c
+ ${common_SRCDIR}/args.c
+ ${common_SRCDIR}/memory.c
+ ${common_SRCDIR}/globals.c
+ ${common_SRCDIR}/htmllex.c
+ ${common_SRCDIR}/htmltable.c
+ ${common_SRCDIR}/input.c
+ ${common_SRCDIR}/pointset.c
+ ${common_SRCDIR}/postproc.c
+ ${common_SRCDIR}/routespl.c
+ ${common_SRCDIR}/splines.c
+ ${common_SRCDIR}/psusershape.c
+ ${common_SRCDIR}/timing.c
+ ${common_SRCDIR}/labels.c
+ ${common_SRCDIR}/ns.c
+ ${common_SRCDIR}/shapes.c
+ ${common_SRCDIR}/utils.c
+ ${common_SRCDIR}/geom.c
+ ${common_SRCDIR}/output.c
+ ${common_SRCDIR}/emit.c
+)
+
+SET(common_codegen_SRCS
+ ${common_SRCDIR}/diagen.c
+ ${common_SRCDIR}/figgen.c
+ ${common_SRCDIR}/hpglgen.c
+ ${common_SRCDIR}/mifgen.c
+ ${common_SRCDIR}/mpgen.c
+ ${common_SRCDIR}/picgen.c
+ ${common_SRCDIR}/vtxgen.c
+ ${common_SRCDIR}/xdgen.c
+)
+
+set(common_generated_SRCS
+ ${common_SRCDIR}/colortbl.h
+ ${common_SRCDIR}/htmlparse.h
+ ${common_SRCDIR}/htmlparse.c
+ ${common_SRCDIR}/ps.h
+)
+
+set(common_SRCS
+ ${common_base_SRCS}
+ ${common_codegen_SRCS}
+ ${common_generated_SRCS}
+)
# $Id$ $Revision$
## Process this file with cmake to produce Makefile
-INCLUDE( UsePkgConfig )
-
-INCLUDE( FindJPEG )
-INCLUDE( FindPNG )
-INCLUDE( FindZLIB )
-
-PKGCONFIG( freetype2 FREETYPE_INCLUDE_DIR FREETYPE_LIB_DIR FREETYPE_LINK_FLAGS FREETYPE_CFLAGS )
-PKGCONFIG( fontconfig FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIB_DIR FONTCONFIG_LINK_FLAGS FONTCONFIG_CFLAGS )
-
-INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_SOURCE_DIR}
- ${FREETYPE_INCLUDE_DIR}
- ${FONTCONFIG_INCLUDE_DIR}
-)
-
-
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
########### next target ###############
-ADD_DEFINITIONS(${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS})
-SET(gvgd_SRCS
- gdtables.c
- gd.c
- gdfx.c
- gd_security.c
- gd_gd.c
- gd_gd2.c
- gd_io.c
- gd_io_dp.c
- gd_gif_in.c
- gd_gif_out.c
- gd_io_file.c
- gd_io_ss.c
- gd_jpeg.c
- gd_png.c
- gd_ss.c
- gd_topal.c
- gd_wbmp.c
- gdcache.c
- gdfontg.c
- gdfontl.c
- gdfontmb.c
- gdfonts.c
- gdfontt.c
- gdft.c
- gdhelpers.c
- gdkanji.c
- gdxpm.c
- wbmp.c
-)
+INCLUDE(${CMAKE_SOURCE_DIR}/lib/gd/sources.cmake)
-ADD_LIBRARY(gvgd STATIC ${gvgd_SRCS})
+SET(gvgd_SRCS ${gd_SRCS})
+ADD_LIBRARY(gvgd STATIC ${gvgd_SRCS})
########### install files ###############
--- /dev/null
+# $Id$ $Revision$
+
+SET(gd_SRCDIR ${CMAKE_SOURCE_DIR}/lib/gd)
+
+INCLUDE( UsePkgConfig )
+
+INCLUDE( FindJPEG )
+INCLUDE( FindPNG )
+INCLUDE( FindZLIB )
+
+PKGCONFIG( freetype2 FREETYPE_INCLUDE_DIR FREETYPE_LIB_DIR FREETYPE_LINK_FLAGS FREETYPE_CFLAGS )
+PKGCONFIG( fontconfig FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIB_DIR FONTCONFIG_LINK_FLAGS FONTCONFIG_CFLAGS )
+
+INCLUDE_DIRECTORIES(
+ ${gd_SRCDIR}
+ ${FREETYPE_INCLUDE_DIR}
+ ${FONTCONFIG_INCLUDE_DIR}
+)
+
+ADD_DEFINITIONS(${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS})
+
+SET(gd_SRCS
+ ${gd_SRCDIR}/gdtables.c
+ ${gd_SRCDIR}/gd.c
+ ${gd_SRCDIR}/gdfx.c
+ ${gd_SRCDIR}/gd_security.c
+ ${gd_SRCDIR}/gd_gd.c
+ ${gd_SRCDIR}/gd_gd2.c
+ ${gd_SRCDIR}/gd_io.c
+ ${gd_SRCDIR}/gd_io_dp.c
+ ${gd_SRCDIR}/gd_gif_in.c
+ ${gd_SRCDIR}/gd_gif_out.c
+ ${gd_SRCDIR}/gd_io_file.c
+ ${gd_SRCDIR}/gd_io_ss.c
+ ${gd_SRCDIR}/gd_jpeg.c
+ ${gd_SRCDIR}/gd_png.c
+ ${gd_SRCDIR}/gd_ss.c
+ ${gd_SRCDIR}/gd_topal.c
+ ${gd_SRCDIR}/gd_wbmp.c
+ ${gd_SRCDIR}/gdcache.c
+ ${gd_SRCDIR}/gdfontg.c
+ ${gd_SRCDIR}/gdfontl.c
+ ${gd_SRCDIR}/gdfontmb.c
+ ${gd_SRCDIR}/gdfonts.c
+ ${gd_SRCDIR}/gdfontt.c
+ ${gd_SRCDIR}/gdft.c
+ ${gd_SRCDIR}/gdhelpers.c
+ ${gd_SRCDIR}/gdkanji.c
+ ${gd_SRCDIR}/gdxpm.c
+ ${gd_SRCDIR}/wbmp.c
+)
## Process this file with cmake to produce Makefile
INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/lib/cdt
)
-########### next target ###############
-
ADD_CUSTOM_COMMAND(
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT parser.c
- OUTPUT parser.h
- DEPENDS parser.y
- COMMAND yacc -dv parser.y
- COMMAND sed "s/yy/ag/g" < y.tab.c > parser.c
- COMMAND sed "s/yy/ag/g" < y.tab.h > parser.h
- COMMAND rm y.tab.c y.tab.h y.output
+ OUTPUT graph.pdf
+ DEPENDS graph.3
+ COMMAND groff -Tps -man graph.3 | ps2pdf - graph.pdf
)
-SET(graph_SRCS
- attribs.c
- agxbuf.c
- edge.c
- graph.c
- graphio.c
- lexer.c
- node.c
- parser.c
- refstr.c
- trie.c
-)
+########### next target ###############
+
+INCLUDE(${CMAKE_SOURCE_DIR}/lib/graph/sources.cmake)
ADD_LIBRARY(graph STATIC ${graph_SRCS})
--- /dev/null
+# $Id$ $Revision$
+
+SET(graph_SRCDIR ${CMAKE_SOURCE_DIR}/lib/graph)
+
+INCLUDE_DIRECTORIES(${graph_SRCDIR})
+
+ADD_CUSTOM_COMMAND(
+ WORKING_DIRECTORY ${graph_SRCDIR}
+ OUTPUT parser.c
+ OUTPUT parser.h
+ DEPENDS parser.y
+ COMMAND yacc -dv parser.y
+ COMMAND sed "s/yy/ag/g" < y.tab.c > parser.c
+ COMMAND sed "s/yy/ag/g" < y.tab.h > parser.h
+ COMMAND rm y.tab.c y.tab.h y.output
+)
+
+SET(graph_SRCS
+ ${graph_SRCDIR}/attribs.c
+ ${graph_SRCDIR}/agxbuf.c
+ ${graph_SRCDIR}/edge.c
+ ${graph_SRCDIR}/graph.c
+ ${graph_SRCDIR}/graphio.c
+ ${graph_SRCDIR}/lexer.c
+ ${graph_SRCDIR}/node.c
+ ${graph_SRCDIR}/parser.c
+ ${graph_SRCDIR}/refstr.c
+ ${graph_SRCDIR}/trie.c
+)