aboutsummaryrefslogtreecommitdiff
path: root/cmake/install.cmake
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2017-07-21 18:57:07 +0200
committerAxel Huebl <axel.huebl@plasma.ninja>2017-07-24 18:05:58 +0200
commit2f3cf527224369318fedd88013d6a8e464d1aa3d (patch)
treeb2ebc5983ca763048cb49f1d7e420018f0a1f50f /cmake/install.cmake
parent942a29cecd36f2a4b22fdd2179635cd548e6bd27 (diff)
downloadprotobuf-2f3cf527224369318fedd88013d6a8e464d1aa3d.tar.gz
protobuf-2f3cf527224369318fedd88013d6a8e464d1aa3d.tar.bz2
protobuf-2f3cf527224369318fedd88013d6a8e464d1aa3d.zip
CMake: Install .pc Files
Adds pkg-config (`.pc`) files for CMake based installs.
Diffstat (limited to 'cmake/install.cmake')
-rw-r--r--cmake/install.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 28dc90dc..441bf553 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -1,5 +1,10 @@
include(GNUInstallDirs)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY)
+
foreach(_library
libprotobuf-lite
libprotobuf
@@ -17,6 +22,8 @@ endforeach()
install(TARGETS protoc EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+
file(STRINGS extract_includes.bat.in _extract_strings
REGEX "^copy")
foreach(_extract_string ${_extract_strings})