From 0432a38299447eb236c7b1440d34ae9e655058b9 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Tue, 10 Nov 2020 08:42:00 +0100 Subject: [BUILD] build docker containers only if build of dnbd3-server is enabled This patch fixes the issue that a Docker container for the dnbd3 components (including the dnbd3-server) can be built with missing dnbd3-server's binary. Since the created Docker container starts the missing binary, it will fail. Therefore, a built of the Docker image is only possible if building of the dnbd3-server is enabled (CMAKE option DNBD3_SERVER=ON). --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 219ec00..76f5190 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -194,7 +194,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release) DEPENDS package_source_main) # include target to make docker image - if(NOT DNBD3_KERNEL_MODULE AND DNBD3_PACKAGE_DOCKER) + if(NOT DNBD3_KERNEL_MODULE AND DNBD3_SERVER AND DNBD3_PACKAGE_DOCKER) find_package(Docker REQUIRED) include(DockerImage) @@ -211,7 +211,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release) set(PACKAGE_FILE_ARCHLINUX ${CPACK_PACKAGE_NAME}_${REPOSITORY_VERSION_FULL}_${CMAKE_SYSTEM_PROCESSOR}.tar.gz) set(DOCKER_IMAGE_ARCHLINUX ${CPACK_PACKAGE_NAME}_${REPOSITORY_VERSION_FULL}_${CMAKE_SYSTEM_PROCESSOR}_archlinux_docker.tar) add_docker_image(docker-archlinux ${DOCKER_IMAGE_ARCHLINUX} ${DOCKER_FILE_ARCHLINUX} ${DOCKER_TAG} ${PACKAGE_FILE_ARCHLINUX} ${CMAKE_BINARY_DIR}) - endif(NOT DNBD3_KERNEL_MODULE AND DNBD3_PACKAGE_DOCKER) + endif(NOT DNBD3_KERNEL_MODULE AND DNBD3_SERVER AND DNBD3_PACKAGE_DOCKER) endif(CMAKE_BUILD_TYPE MATCHES Release) # add all dnbd3 related projects from the source code directory -- cgit v1.2.3-55-g7522