diff options
author | Manuel Bentele | 2020-11-02 09:44:34 +0100 |
---|---|---|
committer | Manuel Bentele | 2020-11-02 09:44:34 +0100 |
commit | 2ac947f4ec8a34a6c302a76260f646b36a2078b1 (patch) | |
tree | 8c2c053e55f8edafbdf292d34ef8d3bec80b3174 /cmake | |
parent | [CLIENT] format output of program help text (diff) | |
download | dnbd3-2ac947f4ec8a34a6c302a76260f646b36a2078b1.tar.gz dnbd3-2ac947f4ec8a34a6c302a76260f646b36a2078b1.tar.xz dnbd3-2ac947f4ec8a34a6c302a76260f646b36a2078b1.zip |
[BUILD] add CMake support to build docker images based on Archlinux
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/DockerImage.cmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/DockerImage.cmake b/cmake/DockerImage.cmake index 54751e4..83f4b9d 100644 --- a/cmake/DockerImage.cmake +++ b/cmake/DockerImage.cmake @@ -3,16 +3,16 @@ # Copyright (C) 2020 Manuel Bentele <development@manuel-bentele.de> # +# create a pseudo target to do packaging before docker image is built +add_custom_target(package_docker + COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target package + VERBATIM) + # macro to build a docker image based on a provided Dockerfile and an installation package macro(add_docker_image TARGET_NAME DOCKER_IMAGE DOCKER_FILE DOCKER_TAG PACKAGE_FILE BUILD_DIR) get_filename_component(PACKAGE_FILE_PATH ${PACKAGE_FILE} PATH) get_filename_component(PACKAGE_FILE_NAME ${PACKAGE_FILE} NAME) - # create a pseudo target to do packaging before docker image is built - add_custom_target(package_docker - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target package - VERBATIM) - # commands and target to build docker image add_custom_command(OUTPUT ${DOCKER_IMAGE} COMMAND docker image build -t ${DOCKER_TAG} --file ${DOCKER_FILE} --build-arg DNBD3_PACKAGE_FILE_NAME=${PACKAGE_FILE_NAME} ${BUILD_DIR} |