From 7da947fdecc93725274a0709d60c5e013310802c Mon Sep 17 00:00:00 2001 From: ellson Date: Fri, 23 Jun 2006 03:11:23 +0000 Subject: [PATCH] Experimenting with cmake - which claims to replace autoconf,automake,libtool and be more portable --- lib/circogen/CMakeLists.txt | 67 +++++++++++++++ lib/common/.cvsignore | 1 + lib/common/CMakeLists.txt | 165 ++++++++++++++++++++++++++++++++++++ 3 files changed, 233 insertions(+) create mode 100644 lib/circogen/CMakeLists.txt create mode 100644 lib/common/CMakeLists.txt diff --git a/lib/circogen/CMakeLists.txt b/lib/circogen/CMakeLists.txt new file mode 100644 index 000000000..95001e2c4 --- /dev/null +++ b/lib/circogen/CMakeLists.txt @@ -0,0 +1,67 @@ +# $Id$ $Revision$ +## Process this file with cmake to produce Makefile + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/common + ${CMAKE_SOURCE_DIR}/lib/gvc + ${CMAKE_SOURCE_DIR}/lib/neatogen + ${CMAKE_SOURCE_DIR}/lib/pack + ${CMAKE_SOURCE_DIR}/lib/pathplan + ${CMAKE_SOURCE_DIR}/lib/graph + ${CMAKE_SOURCE_DIR}/lib/cdt +) + + +########### next target ############### + +SET(circogen_SRCS + circularinit.c + nodelist.c + block.c + edgelist.c + stack.c + circular.c + deglist.c + blocktree.c + blockpath.c + circpos.c + nodeset.c +) + +ADD_LIBRARY(circogen STATIC ${circogen_SRCS}) + + +########### install files ############### + + + + +#original Makefile.am contents follow: + +## $Id$ $Revision$ +### Process this file with automake to produce Makefile.in +# +#pkgconfigdir = $(libdir)/pkgconfig +# +#AM_CPPFLAGS = \ +# -I$(top_srcdir) \ +# -I$(top_srcdir)/lib/common \ +# -I$(top_srcdir)/lib/gvc \ +# -I$(top_srcdir)/lib/neatogen \ +# -I$(top_srcdir)/lib/pack \ +# -I$(top_srcdir)/lib/pathplan \ +# -I$(top_srcdir)/lib/graph \ +# -I$(top_srcdir)/lib/cdt +# +#noinst_HEADERS = block.h blockpath.h blocktree.h circo.h \ +# circpos.h circular.h deglist.h edgelist.h nodelist.h \ +# nodeset.h stack.h +#noinst_LTLIBRARIES = libcircogen_C.la +# +#libcircogen_C_la_SOURCES = circularinit.c nodelist.c block.c edgelist.c \ +# stack.c circular.c deglist.c blocktree.c blockpath.c \ +# circpos.c nodeset.c +# +#EXTRA_DIST = Makefile.old diff --git a/lib/common/.cvsignore b/lib/common/.cvsignore index cfa9ec72b..1dee025b2 100644 --- a/lib/common/.cvsignore +++ b/lib/common/.cvsignore @@ -11,3 +11,4 @@ colortbl.h htmlparse.[ch] y.output y.tab.[ch] +CMakeFiles CMakeTmp CMakeFiles CMakeCache.txt cmake_install.cmake diff --git a/lib/common/CMakeLists.txt b/lib/common/CMakeLists.txt new file mode 100644 index 000000000..a520eccaa --- /dev/null +++ b/lib/common/CMakeLists.txt @@ -0,0 +1,165 @@ +# $Id$ $Revision$ +## 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/fdpgen + ${CMAKE_SOURCE_DIR}/lib/pathplan + ${CMAKE_SOURCE_DIR}/lib/graph + ${CMAKE_SOURCE_DIR}/lib/cdt +) + + +########### next target ############### + +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/htmlparse.c + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/htmlparse.h + DEPENDS htmlparse.y + COMMAND yacc -dv htmlparse.y + COMMAND sed "s/yy/html/g" < y.tab.c > ${CMAKE_CURRENT_SOURCE_DIR}/htmlparse.c + COMMAND sed "s/yy/html/g" < y.tab.h > ${CMAKE_CURRENT_SOURCE_DIR}/htmlparse.h + COMMAND rm y.tab.c y.tab.h y.output +) + +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ps.h + DEPENDS ps.txt + COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/stringize.awk ps.txt > ${CMAKE_CURRENT_SOURCE_DIR}/ps.h +) + +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/colortbl.h + DEPENDS color_names + DEPENDS brewer_colors + COMMAND LC_COLLATE=C sort color_names > ${CMAKE_CURRENT_SOURCE_DIR}/color_lib + COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/brewer.awk brewer_colors >> ${CMAKE_CURRENT_SOURCE_DIR}/color_lib + COMMAND awk -f ${CMAKE_SOURCE_DIR}/awk/colortbl.awk color_lib > ${CMAKE_CURRENT_SOURCE_DIR}/colortbl.h + COMMAND rm color_lib +) + +SET(CODEGEN_SRCS + diagen.c + figgen.c + hpglgen.c + mapgen.c + mifgen.c + mpgen.c + picgen.c + psgen.c + svggen.c + vtxgen.c + xdgen.c +) + +SET(common_SRCS + ps.h + colortbl.h + htmltable.h + arrows.c + colxlate.c + fontmetrics.c + args.c + memory.c + globals.c + htmllex.c + htmlparse.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 + ${CODEGENS_SRCS} +) + +ADD_LIBRARY(common STATIC ${common_SRCS}) + + +########### install files ############### + + + + +#original Makefile.am contents follow: + +## $Id$ $Revision$ +### Process this file with automake to produce Makefile.in +# +#AM_CPPFLAGS = \ +# -I$(top_srcdir) \ +# -I$(top_srcdir)/lib/gvc \ +# -I$(top_srcdir)/lib/pack \ +# -I$(top_srcdir)/lib/fdpgen \ +# -I$(top_srcdir)/lib/pathplan \ +# -I$(top_srcdir)/lib/graph \ +# -I$(top_srcdir)/lib/cdt @GD_INCLUDES@ @EXPAT_INCLUDES@ @Z_INCLUDES@ +# +#pkginclude_HEADERS = logic.h arith.h geom.h color.h types.h globals.h textpara.h usershape.h +#noinst_HEADERS = render.h utils.h memory.h \ +# geomprocs.h colorprocs.h colortbl.h entities.h \ +# const.h macros.h htmllex.h htmltable.h pointset.h +#noinst_LTLIBRARIES = libcommon_C.la +# +#if WITH_LIBGD +#GD_CODEGENS = gdgen.c vrmlgen.c +#endif +# +#if WITH_CODEGENS +#CODEGENS = $(GD_CODEGENS) diagen.c figgen.c hpglgen.c mapgen.c mifgen.c mpgen.c \ +# picgen.c psgen.c svggen.c vtxgen.c ps.txt xdgen.c color_names +#endif +# +# +#libcommon_C_la_SOURCES = arrows.c colxlate.c fontmetrics.c \ +# args.c memory.c globals.c htmllex.c htmlparse.y 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 $(CODEGENS) +# +#psgen.o psgen.lo : ps.h +# +#ps.h : ps.txt +# $(AWK) -f $(top_srcdir)/awk/stringize.awk ps.txt > ps.h +# +#colxlate.o colxlate.lo : colortbl.h +# +#colortbl.h : color_lib +# $(AWK) -f $(top_srcdir)/awk/colortbl.awk color_lib > colortbl.h +# +#color_lib : brewer_lib $(top_srcdir)/lib/common/color_names +# cat brewer_lib $(top_srcdir)/lib/common/color_names | LC_COLLATE=C $(SORT) > color_lib +# +#brewer_lib : $(top_srcdir)/lib/common/brewer_colors $(top_srcdir)/awk/brewer.awk +# $(AWK) -f $(top_srcdir)/awk/brewer.awk $(top_srcdir)/lib/common/brewer_colors > brewer_lib +# +#htmllex.o htmllex.lo: htmllex.c htmllex.h htmlparse.h +#htmlparse.o htmlparse.lo: htmlparse.c htmlparse.h +# +#y.output: $(top_srcdir)/lib/common/htmlparse.y +# @YACC@ -dv $(top_srcdir)/lib/common/htmlparse.y +# +#htmlparse.c: y.output +# @SED@ "s/yy/html/g" < y.tab.c > htmlparse.c +# +#htmlparse.h: y.output +# @SED@ "s/yy/html/g" < y.tab.h > htmlparse.h +# +#DISTCLEANFILES = brewer_lib color_lib colortbl.h y.output y.tab.[ch] htmlparse.[ch] +# +#EXTRA_DIST = Makefile.old README.imap chars.tcl ps.h \ +# strcasecmp.c strncasecmp.c htmlparse.c htmlparse.h \ +# y.tab.c y.tab.h y.output entities.html entities.tcl \ +# brewer_colors brewer_lib color_names color_lib colortbl.h -- 2.40.0