From 33eb73ce15941eb2162f4c213c19b46726766c5a Mon Sep 17 00:00:00 2001 From: Bob Jamison Date: Tue, 20 Feb 2007 21:06:07 +0000 Subject: remove old *.mingw files (bzr r2408) --- src/deptool.cpp | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) (limited to 'src/deptool.cpp') diff --git a/src/deptool.cpp b/src/deptool.cpp index 044d197ff..ffb533981 100644 --- a/src/deptool.cpp +++ b/src/deptool.cpp @@ -289,6 +289,11 @@ private: */ bool saveDepFile(bool doXml); + /** + * + */ + bool saveCmakeFile(); + /** * */ @@ -1006,6 +1011,7 @@ bool DepTool::run() if (!generateDependencies()) return false; saveDepFile(false); + saveCmakeFile(); //saveRefFile(true); return true; } @@ -1362,6 +1368,69 @@ bool DepTool::saveRefFile(bool doXml) } +/** + * This is a new thing. It creates a cmake file that should be able to + * build the entire thing. + */ +bool DepTool::saveCmakeFile() +{ + time_t tim; + time(&tim); + + FILE *f = fopen("CMakeLists.txt", "w"); + if (!f) + { + trace("cannot open 'CMakeLists.txt' for writing"); + } + fprintf(f, "########################################################\n"); + fprintf(f, "## File: CMakeLists.txt\n"); + fprintf(f, "## Generated by DepTool at :%s", ctime(&tim)); + fprintf(f, "########################################################\n"); + + fprintf(f, "\n\n"); + + fprintf(f, "\n\n\n"); + fprintf(f, "########################################################\n"); + fprintf(f, "## P R O J E C T\n"); + fprintf(f, "########################################################\n"); + fprintf(f, "project (INKSCAPE)\n"); + fprintf(f, "\n\n\n"); + fprintf(f, "########################################################\n"); + fprintf(f, "## O B J E C T S\n"); + fprintf(f, "########################################################\n"); + fprintf(f, "set (INKSCAPE_SRCS\n"); + + std::map::iterator oiter; + for (oiter=allFiles.begin() ; oiter!=allFiles.end() ; oiter++) + { + FileRec *frec = oiter->second; + if (frec->type == FileRec::CFILE) + { + //fprintf(f, " \\\n"); + String fname = frec->path; + if (fname.size()>0) + fname.append("/"); + fname.append(frec->baseName); + fname.append("."); + fname.append(frec->suffix); + fprintf(f, "%s\n", fname.c_str()); + } + } + fprintf(f, ")\n\n"); + + fprintf(f, "add_executable (inkscape ${INKSCAPE_SRCS})\n"); + + fprintf(f, "\n\n\n"); + fprintf(f, "########################################################\n"); + fprintf(f, "## E N D\n"); + fprintf(f, "########################################################\n"); + + fclose(f); + + return true; +} + + -- cgit v1.2.3