XML support in MSVC build

Started by Magnus Haganderabout 19 years ago2 messages
#1Magnus Hagander
magnus@hagander.net
1 attachment(s)

Attached patch adds support for the recent XML-in-backend stuff to the
MSVC build. Most config stuff was already present for contrib/xml2, but
needed to add the includes and defines to the backend build as well.

//Magnus

Attachments:

msvc_xml.patchtext/plain; charset=us-asciiDownload
Index: src/tools/msvc/Solution.pm
===================================================================
RCS file: /projects/cvsroot/pgsql/src/tools/msvc/Solution.pm,v
retrieving revision 1.4
diff -c -r1.4 Solution.pm
*** src/tools/msvc/Solution.pm	29 Nov 2006 19:49:31 -0000	1.4
--- src/tools/msvc/Solution.pm	29 Dec 2006 13:23:37 -0000
***************
*** 84,89 ****
--- 84,93 ----
  		print O "#define USE_SSL 1\n" if ($self->{options}->{openssl});
  		print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls});
  		print O "#define LOCALEDIR \"/usr/local/pgsql/share/locale\"\n" if ($self->{options}->{nls});
+ 		if ($self->{options}->{xml}) {
+          print O "#define HAVE_LIBXML2\n";
+          print O "#define USE_LIBXML\n";
+       }
  		if ($self->{options}->{krb5}) {
  			print O "#define KRB5 1\n";
  			print O "#define HAVE_KRB5_ERROR_TEXT_DATA 1\n";
***************
*** 246,251 ****
--- 250,260 ----
  		$proj->AddLibrary($self->{options}->{krb5} . '\lib\i386\krb5_32.lib');
  		$proj->AddLibrary($self->{options}->{krb5} . '\lib\i386\comerr32.lib');
  	}
+ 	if ($self->{options}->{xml}) {
+       $proj->AddIncludeDir($self->{options}->{xml} . '\include');
+       $proj->AddIncludeDir($self->{options}->{iconv} . '\include');
+       $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib');
+    }
  	return $proj;
  }
  
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#1)
Re: XML support in MSVC build

Magnus Hagander <magnus@hagander.net> writes:

Attached patch adds support for the recent XML-in-backend stuff to the
MSVC build. Most config stuff was already present for contrib/xml2, but
needed to add the includes and defines to the backend build as well.

Applied, thanks.

regards, tom lane