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.
Asked: 2022-06-15 11:00:00 +0000
Seen: 13 times
Last updated: Jul 05 '22