1 | initial version |
To exclude INSTALL commands from the subdirectory in CPack, you can use the following command in the top-level CMakeLists.txt file:
set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_CURRENT_SOURCE_DIR}/googletest:OFF")
This command appends the googletest subdirectory to the list of projects that should not have INSTALL commands included in their package. The :OFF
option explicitly sets INSTALL to OFF for the googletest project.