aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-10-16 00:13:24 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-10-16 00:38:06 +0200
commitef14ee964ac098888a662b0a98fd88869d255d86 (patch)
tree0080fe7b5549180ecb5b229d2015fe25c401a7ae /CMakeLists.txt
parentd0d843b7046ced76336604450f8eb78b4decfa09 (diff)
downloaddynstr-ef14ee964ac098888a662b0a98fd88869d255d86.tar.gz
Install .pc file
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
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)