core/gtest/gtest-pkgconfig.patch

28 lines
745 B
Diff
Raw Normal View History

2018-01-23 03:49:56 +08:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 281c4c2..e4354a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,9 @@
pre_project_set_up_hermetic_build()
endif()
+# pkg-config support
+configure_file("gtest.pc.in" "gtest.pc" @ONLY)
+
########################################################################
#
# Project-wide settings
@@ -71,6 +71,10 @@
cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
target_link_libraries(gtest_main gtest)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gtest.pc"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/"
+)
+
########################################################################
#
# Samples on how to link user tests with gtest or gtest_main.
--
1.9.1