diff options
author | Dario Lombardo <lomato@gmail.com> | 2016-11-20 20:34:09 +0100 |
---|---|---|
committer | Dario Lombardo <lomato@gmail.com> | 2016-11-21 09:02:11 +0000 |
commit | 035e404fff4ce11348fc0e019a368ddd080a1266 (patch) | |
tree | e9cbfd4cc056ad960adf11016a25104dd52ecf5c /cmake | |
parent | 48c423a7244e10894991a964d5a4eca0e465ef84 (diff) |
cmake: add creation of version.conf to be shipped in tarball.
Change-Id: I2bb66844b29cd4805d201891ffba342d26ee475f
Reviewed-on: https://code.wireshark.org/review/18731
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/Dist.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/modules/Dist.cmake b/cmake/modules/Dist.cmake new file mode 100644 index 0000000000..7c0b3bb105 --- /dev/null +++ b/cmake/modules/Dist.cmake @@ -0,0 +1,11 @@ +message("Copying source files from ${PROJECT_SOURCE_DIR} to ${WS_SOURCE_DIR}") + +# create destination dir +file(MAKE_DIRECTORY "${WS_SOURCE_DIR}") + +# Copy all files in the state *as known by git*, respecting export-ignore in .gitattributes +execute_process(COMMAND "${GIT_EXECUTABLE}" checkout-index -a -f --prefix "${WS_SOURCE_DIR}/" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + +# Generate the version.conf and put it in brand new source dir +execute_process(COMMAND "${GIT_EXECUTABLE}" describe WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE GIT_DESCRIBE) +file(WRITE "${WS_SOURCE_DIR}/version.conf" "git_description=${GIT_DESCRIBE}") |