aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/CMakeLists.txt
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2017-09-01 00:05:22 -0400
committerGitHub <noreply@github.com>2017-09-01 00:05:22 -0400
commitee53b281ba16f5402e3a42003414a68d336fcd94 (patch)
tree2e629c5674eb80d2090aca0c27f8388d5b4801da /googlemock/CMakeLists.txt
parentca76206f4268a009427afa96dfd792012db64583 (diff)
parent69e794ca75e6c07ad78a8f7467c267be9ac08921 (diff)
downloadgoogletest-ee53b281ba16f5402e3a42003414a68d336fcd94.tar.gz
googletest-ee53b281ba16f5402e3a42003414a68d336fcd94.tar.bz2
googletest-ee53b281ba16f5402e3a42003414a68d336fcd94.zip
Merge branch 'master' into user_logger_instead_of_printf
Diffstat (limited to 'googlemock/CMakeLists.txt')
-rw-r--r--googlemock/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
index c3c8aaeb..bd759dfd 100644
--- a/googlemock/CMakeLists.txt
+++ b/googlemock/CMakeLists.txt
@@ -37,7 +37,12 @@ endif()
# as ${gmock_SOURCE_DIR} and to the root binary directory as
# ${gmock_BINARY_DIR}.
# Language "C" is required for find_package(Threads).
-project(gmock CXX C)
+if (CMAKE_VERSION VERSION_LESS 3.0)
+ project(gmock CXX C)
+else()
+ cmake_policy(SET CMP0048 NEW)
+ project(gmock VERSION 1.9.0 LANGUAGES CXX C)
+endif()
cmake_minimum_required(VERSION 2.6.4)
if (COMMAND set_up_hermetic_build)
@@ -110,6 +115,18 @@ if(INSTALL_GMOCK)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+ # configure and install pkgconfig files
+ configure_file(
+ cmake/gmock.pc.in
+ "${CMAKE_BINARY_DIR}/gmock.pc"
+ @ONLY)
+ configure_file(
+ cmake/gmock_main.pc.in
+ "${CMAKE_BINARY_DIR}/gmock_main.pc"
+ @ONLY)
+ install(FILES "${CMAKE_BINARY_DIR}/gmock.pc" "${CMAKE_BINARY_DIR}/gmock_main.pc"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif()
########################################################################