Skip to content

Commit 1c14d3c

Browse files
committed
cmake/modules/Builduadk.cmake: fix build
DESTDIR should not be set when building. Fixes: https://tracker.ceph.com/issues/72722 Signed-off-by: Dan Mick <[email protected]>
1 parent 1cd5aa4 commit 1c14d3c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

cmake/modules/Builduadk.cmake

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ function(build_uadk)
88
set(configure_cmd env ./configure --prefix=${UADK_INSTALL_DIR})
99
list(APPEND configure_cmd --with-pic --enable-static --disable-shared --with-static_drv)
1010

11+
# command prefix to unset DESTDIR; otherwise debhelper and
12+
# CMake fight about installation directories, and since
13+
# everything here stays in the source tree, packaging
14+
# is not necessary
15+
16+
set(UNSET_DESTDIR /usr/bin/env --unset=DESTDIR)
17+
1118
include(ExternalProject)
1219
ExternalProject_Add(uadk_ext
1320
UPDATE_COMMAND "" # this disables rebuild on each run
@@ -17,10 +24,10 @@ function(build_uadk)
1724
SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/uadk"
1825
BUILD_IN_SOURCE 1
1926
CMAKE_ARGS -DCMAKE_CXX_COMPILER=which g++
20-
CONFIGURE_COMMAND ./autogen.sh COMMAND ${configure_cmd}
21-
BUILD_COMMAND make
27+
CONFIGURE_COMMAND ${UNSET_DESTDIR} ./autogen.sh COMMAND ${configure_cmd}
28+
BUILD_COMMAND ${UNSET_DESTDIR} make
2229
BUILD_BYPRODUCTS ${UADK_WD_LIBRARY} ${UADK_WD_COMP_LIBRARY} ${UADK_WD_ZIP_LIBRARY}
23-
INSTALL_COMMAND make install
30+
INSTALL_COMMAND ${UNSET_DESTDIR} make install
2431
LOG_CONFIGURE ON
2532
LOG_BUILD ON
2633
LOG_INSTALL ON

0 commit comments

Comments
 (0)