diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2017-08-14 14:33:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-14 14:33:41 -0400 |
commit | e0fc65c5fbfe4e50a0369d032e9b2811b4b7db77 (patch) | |
tree | a7a622d02e195e12ce9e789f18809633dd6f2bd0 /googlemock/CMakeLists.txt | |
parent | 673c975a963f356b19fea90cb57b69192253da2a (diff) | |
parent | 9cacce4e5ca01f2c15775cf5e59297a7b422cd8b (diff) | |
download | googletest-e0fc65c5fbfe4e50a0369d032e9b2811b4b7db77.tar.gz googletest-e0fc65c5fbfe4e50a0369d032e9b2811b4b7db77.tar.bz2 googletest-e0fc65c5fbfe4e50a0369d032e9b2811b4b7db77.zip |
Merge pull request #1197 from SoapGentoo/pkgconfig
Add support for pkgconfig
Diffstat (limited to 'googlemock/CMakeLists.txt')
-rw-r--r-- | googlemock/CMakeLists.txt | 19 |
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() ######################################################################## |