From c67b8b7ce0d8cf46eea652d5cf4ef5eb7831f3dc Mon Sep 17 00:00:00 2001 From: Rhys Ulerich Date: Wed, 23 Sep 2009 22:05:46 -0400 Subject: [PATCH] Added pkgconfig support --- CMakeLists.txt | 10 ++++++++++ eigen2.pc.in | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 eigen2.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index b924dfa0b..aee1a9263 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,9 @@ if(NOT WIN32) 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) @@ -71,6 +74,13 @@ endif(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +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(unsupported) diff --git a/eigen2.pc.in b/eigen2.pc.in new file mode 100644 index 000000000..b508a58d3 --- /dev/null +++ b/eigen2.pc.in @@ -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}