Skip to content

Commit 93ce11a

Browse files
authored
BLD: Add a pkgconfig file (#243)
Super useful for `meson`, and seems to have been missed for `xtensor-blas`, it is generated for every other sub-project of the xtensor-stack.
1 parent e57df11 commit 93ce11a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ install(DIRECTORY ${INCLUDE_DIR}/xflens
153153
PATTERN filter.pm EXCLUDE
154154
PATTERN CMakeLists.txt EXCLUDE)
155155

156+
configure_file(${PROJECT_NAME}.pc.in
157+
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
158+
@ONLY)
159+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
160+
DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig/")
161+
156162
set(XTENSOR_BLAS_CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" CACHE
157163
STRING "install path for xtensor-blasConfig.cmake")
158164

xtensor-blas.pc.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
prefix=@CMAKE_INSTALL_PREFIX@
2+
includedir=${prefix}/include
3+
4+
Name: xtensor-blas
5+
Description: An extension to the xtensor library, offering bindings to BLAS and LAPACK libraries.
6+
Version: @xtensor-blas_VERSION@
7+
Cflags: -I${includedir}

0 commit comments

Comments
 (0)