Added support for 'pkg-config'.

This commit is contained in:
Vincent Richard 2004-12-26 11:00:58 +00:00
parent 51545aa9de
commit 6246c53201
2 changed files with 21 additions and 0 deletions

View File

@ -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 <vincent@vincent-richard.net>
* Renamed class 'disposition' to 'contentDisposition' and the enum

View File

@ -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)