mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
Add pkg-config files to the build
Fixes: https://github.com/jmcnamara/libxlsxwriter/issues/132
This commit is contained in:
parent
c06101fcad
commit
83473df86a
3 changed files with 26 additions and 0 deletions
|
|
@ -177,6 +177,15 @@ if(MSVC AND USE_STATIC_MSVC_RUNTIME)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
# Configure pkg-config
|
||||
file(READ "include/xlsxwriter.h" ver)
|
||||
|
||||
string(REGEX MATCH "VERSION .*\"\(.*\)\".*" _ ${ver})
|
||||
set(VERSION ${CMAKE_MATCH_1})
|
||||
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
configure_file(dev/release/pkg-config.txt xlsxwriter.pc @ONLY)
|
||||
|
||||
# INCLUDES
|
||||
# --------
|
||||
enable_language(CXX)
|
||||
|
|
@ -352,3 +361,4 @@ install(DIRECTORY include/xlsxwriter
|
|||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xlsxwriter.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue