Skip to content

Commit

Permalink
cmake: add tarball command "make tar" for doing releases
Browse files Browse the repository at this point in the history
Signed-off-by: Casper Andersson <[email protected]>
  • Loading branch information
cappe987 committed Jul 27, 2022
1 parent cf61b9b commit e06c6e5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(capmon VERSION 1.0)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wpedantic -Wextra")

set(PROJECT_NAME_VERSION "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}")

set(SRC_FILES
capmon.c
Expand All @@ -25,3 +26,23 @@ install(TARGETS capmon
install(TARGETS capmon
CONFIGURATIONS Release
RUNTIME DESTINATION bin)

add_custom_target(tar
COMMAND
mkdir "-p" "${PROJECT_NAME_VERSION}"
COMMAND
cp
"-r"
"../CMakeLists.txt"
"../LICENSE"
"../README.md"
"../.gitignore"
"../include"
"../src"
"${PROJECT_NAME_VERSION}"
COMMAND
tar
"-cvzf"
"${PROJECT_NAME_VERSION}.tar.gz"
"${PROJECT_NAME_VERSION}/"
)

0 comments on commit e06c6e5

Please sign in to comment.