mirror of
https://github.com/google/googletest.git
synced 2025-04-04 21:15:03 +00:00
Add support for CPack
This commit is contained in:
parent
4902ea2d7c
commit
ee9e61ac5f
1 changed files with 15 additions and 1 deletions
|
@ -3,8 +3,13 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(googletest-distribution)
|
||||
set(GOOGLETEST_VERSION 1.16.0)
|
||||
project(googletest-distribution
|
||||
VERSION ${GOOGLETEST_VERSION}
|
||||
DESCRIPTION "Google's C++ test framework"
|
||||
HOMEPAGE_URL "https://google.github.io/googletest"
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
@ -34,3 +39,12 @@ if(BUILD_GMOCK)
|
|||
else()
|
||||
add_subdirectory( googletest )
|
||||
endif()
|
||||
|
||||
if(INSTALL_GTEST)
|
||||
set(CPACK_PACKAGE_NAME "GTest") # same as the name in `find_package`
|
||||
set(CPACK_PACKAGE_VENDOR "Google")
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
|
||||
include(CPack)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Reference in a new issue