summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorManuel Bentele2020-11-10 08:42:00 +0100
committerManuel Bentele2020-11-10 08:42:00 +0100
commit0432a38299447eb236c7b1440d34ae9e655058b9 (patch)
tree3ad1ec0a3fd7995fb1166294649190f8518f2731 /CMakeLists.txt
parent[CLIENT] display proper connected server if multiple servers specified (diff)
downloaddnbd3-0432a38299447eb236c7b1440d34ae9e655058b9.tar.gz
dnbd3-0432a38299447eb236c7b1440d34ae9e655058b9.tar.xz
dnbd3-0432a38299447eb236c7b1440d34ae9e655058b9.zip
[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).
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
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