From 9e7b5e6ee2f9257f32539762e8c519416a7275b0 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Fri, 31 May 2024 13:25:02 +0000 Subject: [PATCH] BLD: Add a pkgconfig file Super useful for meson --- CMakeLists.txt | 6 ++++++ xtensor-blas.pc.in | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 xtensor-blas.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b3b6ac..ca7b062 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,12 @@ install(DIRECTORY ${INCLUDE_DIR}/xflens PATTERN filter.pm EXCLUDE PATTERN CMakeLists.txt EXCLUDE) +configure_file(${PROJECT_NAME}.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" + @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" + DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig/") + set(XTENSOR_BLAS_CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" CACHE STRING "install path for xtensor-blasConfig.cmake") diff --git a/xtensor-blas.pc.in b/xtensor-blas.pc.in new file mode 100644 index 0000000..7766ec4 --- /dev/null +++ b/xtensor-blas.pc.in @@ -0,0 +1,7 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=${prefix}/include + +Name: xtensor-blas +Description: An extension to the xtensor library, offering bindings to BLAS and LAPACK libraries. +Version: @xtensor-blas_VERSION@ +Cflags: -I${includedir}