Skip to content

Commit 1d59c29

Browse files
authored
BLD: Add a pkgconfig file (#310)
Similar to xtensor-stack/xtensor-blas#243 and done for the same reason (easier to integrate with `meson`).
1 parent f555d12 commit 1d59c29

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ export(EXPORT ${PROJECT_NAME}-targets
124124
install(FILES ${XTENSOR_PYTHON_HEADERS}
125125
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/xtensor-python)
126126

127+
configure_file(${PROJECT_NAME}.pc.in
128+
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
129+
@ONLY)
130+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
131+
DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig/")
132+
127133
set(XTENSOR_PYTHON_CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" CACHE
128134
STRING "install path for xtensor-pythonConfig.cmake")
129135

xtensor-python.pc.in

+7
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-python
5+
Description: An extension to the xtensor library, offering Python bindings with enhanced NumPy support.
6+
Version: @xtensor-python_VERSION@
7+
Cflags: -I${includedir}

0 commit comments

Comments
 (0)