aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--SConstruct19
2 files changed, 21 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e68c25f..265ab212 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@ VERSION 0.6.1-cvs
* Removed relative paths from #include's.
+ * Added support for 'pkg-config'.
+
2004-12-24 Vincent Richard <[email protected]>
* Renamed class 'disposition' to 'contentDisposition' and the enum
diff --git a/SConstruct b/SConstruct
index 631bce0e..40f90ff2 100644
--- a/SConstruct
+++ b/SConstruct
@@ -298,6 +298,8 @@ def GetPackageVersion():
packageName = 'libvmime'
packageVersion = GetPackageVersion()
+packageRealName = 'VMime'
+packageDescription = 'VMime C++ Mail Library (http://vmime.sourceforge.net)'
#############
@@ -790,6 +792,23 @@ for i in range(len(libvmime_install_includes)):
# Configuration header file
env.Install(includeDir, 'src/config.hpp')
+# Pkg-config support
+vmime_pc = open('vmime.pc', 'w')
+
+vmime_pc.write("prefix=" + env['prefix'] + "\n")
+vmime_pc.write("exec_prefix=" + env['prefix'] + "\n")
+vmime_pc.write("libdir=" + env['prefix'] + "/lib\n")
+vmime_pc.write("includedir=" + env['prefix'] + "/include\n")
+vmime_pc.write("\n")
+vmime_pc.write("Name: " + packageRealName + "\n")
+vmime_pc.write("Description: " + packageDescription + "\n")
+vmime_pc.write("Version: " + packageVersion + "\n")
+vmime_pc.write("Requires:\n")
+vmime_pc.write("Libs: -L${libdir} -lvmime-posix -lvmime\n")
+vmime_pc.write("Cflags: -I${includedir}/vmime\n")
+
+env.Install(libDir + "/pkgconfig", "vmime.pc")
+
# Provide "install" target (ie. 'scons install')
env.Alias('install', installPaths)