CS代考计算机代写 # A custom target to create a zip file to handin.

# A custom target to create a zip file to handin.

# Version 1: A custom target named “zip”. Run “make zip” or “cmake –build . –target zip”

# add_custom_target(zip COMMAND
# ${CMAKE_COMMAND} -E tar “cfv” “${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.zip” –format=zip
# ${SRCS}
# “Notes.txt”
# “CMakeLists.txt”
# “CMakeLists-zip.txt”
# “cmake”
# “${ARTWORK}”
# WORKING_DIRECTORY “${PROJECT_SOURCE_DIR}”
# VERBATIM
# )

# Version 2: Describe the package to create. Run “make package” or “cpack”.

# Install only what we specify.
install(FILES
“Notes.txt”
“CMakeLists.txt”
“CMakeLists-zip.txt”
DESTINATION .
)
install(FILES
${SRCS}
DESTINATION “src”
)
install(DIRECTORY “cmake”
DESTINATION .
)
# No trailing slash after the directory name stores the directory not its contents.
install(DIRECTORY “${ARTWORK}”
DESTINATION .
PATTERN “.DS_Store” EXCLUDE
)

## Lie to cpack about our generator so it doesn’t build `preinstall`.
set(CPACK_CMAKE_GENERATOR Ninja)
set(CPACK_GENERATOR “ZIP”)
set(CPACK_PACKAGE_FILE_NAME “${CMAKE_PROJECT_NAME}”)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY ON)
set(CPACK_VERBATIM_VARIABLES YES)
include(CPack)

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *