diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-10-16 00:13:24 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-10-16 00:38:06 +0200 |
| commit | ef14ee964ac098888a662b0a98fd88869d255d86 (patch) | |
| tree | 0080fe7b5549180ecb5b229d2015fe25c401a7ae /CMakeLists.txt | |
| parent | d0d843b7046ced76336604450f8eb78b4decfa09 (diff) | |
| download | dynstr-ef14ee964ac098888a662b0a98fd88869d255d86.tar.gz | |
Install .pc file
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b21447..91609ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,3 +17,9 @@ add_library(${PROJECT_NAME} STATIC "dynstr.c") target_include_directories(${PROJECT_NAME} PUBLIC "include") install(TARGETS ${PROJECT_NAME}) install(DIRECTORY include/ TYPE INCLUDE) +file(READ ${CMAKE_CURRENT_LIST_DIR}/dynstr.pc dynstr_pc) +string(REPLACE /usr/local ${CMAKE_INSTALL_PREFIX} dynstr_repl_pc ${dynstr_pc}) +file(WRITE ${CMAKE_BINARY_DIR}/dynstr.pc ${dynstr_repl_pc}) +include(GNUInstallDirs) +install(FILES ${CMAKE_BINARY_DIR}/dynstr.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) |
