aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/common.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-09 10:43:07 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-09 11:42:10 +0200
commit4d47727d6b71a11f7a7736be773cf80e65477708 (patch)
tree406dc98dbfd86a645289b51527f78aad72c1d558 /cmake/common.cmake
parentd5323f98b73853f0a16d8361d9724c0ec9bafc0f (diff)
Added a target to build an archive from git repo
Change-Id: If6f491f7bf8e3e7a29b9c9db369126dc550318c3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/common.cmake')
-rw-r--r--cmake/common.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index 941e721..d55f907 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -406,5 +406,12 @@ macro(project_closing_msg)
endif()
endmacro()
-# Add RSYSTARGET
+# Add RSYNCTARGET
remote_targets_populate()
+
+add_custom_command(OUTPUT ${PROJECT_PKG_ENTRY_POINT}/${PROJECT_NAME}_${PROJECT_VERSION}.orig.tar.gz
+DEPENDS ${PROJECT_TARGETS}
+ COMMAND git --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git archive --format=tar.gz --prefix=${PROJECT_NAME}-${PROJECT_VERSION}/ HEAD -o ${PROJECT_PKG_ENTRY_POINT}/${PROJECT_NAME}_${PROJECT_VERSION}.orig.tar.gz
+)
+
+add_custom_target(archive DEPENDS ${PROJECT_PKG_ENTRY_POINT}/${PROJECT_NAME}_${PROJECT_VERSION}.orig.tar.gz)