[eigen] Submitting patch to add pkg-config support |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen development <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Submitting patch to add pkg-config support
- From: Rhys Ulerich <rhys.ulerich@xxxxxxxxx>
- Date: Tue, 19 May 2009 13:30:14 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=hr8zRuo5S9grEeCzi6etdPEVBVxo5KNLEJT5bUp9Km4=; b=QpDwM+dteHgbsKolmOVTXOGDYEo+RUIAqTZWFdBhC9VrnnYbrzOh17LNONiDQ9hDXi aEstcDMhYONndhtDAMUkkzwX5jK4DN/G33+2RJtRuBRI21VCJ6jLuLyd6NbZTgolsk8z YuzOum0kCz8qWSkyMbSnwQiL+tK6RC4Sfpt4Y=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=v6FDjFqpRg4ZBa+Zpp9z/fcsTpQMkrjLXUEjGKHB/eijGnA0AsvG/xX+a0FpNBX9GD qvKZSdS/UQx/HP84gnueetvV5JH3FVsrtifkaJR67VeT5s9z6vsMMivlbvS4RbOQDUoC /Wiofa/SLP7LV6gf068ji1t+aYuFeBC0RtUYo=
(Second attempt-- sorry if a duplicate)
Attached is an 'hg export' patch that adds pkg-config support against
trunk. On a non-WIN32 system this installs lib/pkgconfig/eigen2.pc
alongside the include/eigen2/... headers. The motivation for the
patch is that installing the pkgconfig file allows autoconf users to
easily see if Eigen is installed using the PKG_CHECK_MODULES macro.
Please double check me on the CMake details-- I've not used it before.
- Rhys
# HG changeset patch
# User Rhys Ulerich <rhys.ulerich@xxxxxxxxx>
# Date 1242751730 18000
# Node ID 1da87834f59de4bdd77883bffc557128c6e9b070
# Parent 66aaae8b8071fda4a548106b3a187c34e2d78c91
Added pkgconfig support
diff -r 66aaae8b8071 -r 1da87834f59d CMakeLists.txt
--- a/CMakeLists.txt Tue May 19 10:21:24 2009 +0200
+++ b/CMakeLists.txt Tue May 19 11:48:50 2009 -0500
@@ -27,6 +27,9 @@
option(EIGEN_BUILD_LIB "Build the binary shared library" OFF)
endif(NOT WIN32)
option(EIGEN_BUILD_BTL "Build benchmark suite" OFF)
+if(NOT WIN32)
+ option(EIGEN_BUILD_PKGCONFIG "Build pkg-config .pc file for Eigen" ON)
+endif(NOT WIN32)
if(EIGEN_BUILD_LIB)
option(EIGEN_TEST_LIB "Build the unit tests using the library (disable -pedantic)" OFF)
@@ -98,6 +101,13 @@
"The directory where we install the header files"
FORCE)
+if(EIGEN_BUILD_PKGCONFIG)
+ configure_file(eigen2.pc.in eigen2.pc)
+ install(FILES eigen2.pc
+ DESTINATION lib/pkgconfig
+ )
+endif(EIGEN_BUILD_PKGCONFIG)
+
add_subdirectory(Eigen)
add_subdirectory(doc)
@@ -119,4 +129,4 @@
if(EIGEN_BUILD_TESTS)
ei_testing_print_summary()
-endif(EIGEN_BUILD_TESTS)
\ No newline at end of file
+endif(EIGEN_BUILD_TESTS)
diff -r 66aaae8b8071 -r 1da87834f59d eigen2.pc.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/eigen2.pc.in Tue May 19 11:48:50 2009 -0500
@@ -0,0 +1,7 @@
+
+Name: Eigen2
+Description: A C++ template library for linear algebra: vectors, matrices, and related algorithms
+Requires:
+Version: ${EIGEN_VERSION_NUMBER}
+Libs:
+Cflags: -I${INCLUDE_INSTALL_DIR}