From 7db00556fa9a14f8617c2ec1e35ae834689f0da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 12 Feb 2021 14:54:08 +0100 Subject: CMake/Deps: fix build of nasm when asciidoc and xmlto are unavailable Create zero-byte manual page files `nasm.1` and `ndisasm.1` such that nasm's `make install` step succeeds. Installing nasm requires that its manual pages are built. This requires local packages `asciidoc` and `xmlto` to be installed. Not only does `asciidoc` pull in 110 MB of packages (itself + dependencies), there is also no need for these manual pages. Nasm is just used for building other dependencies, and not even part of our precompiled libraries in SVN. Reviewed By: sebbas Differential Revision: https://developer.blender.org/D10396 --- build_files/build_environment/cmake/nasm.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'build_files/build_environment') diff --git a/build_files/build_environment/cmake/nasm.cmake b/build_files/build_environment/cmake/nasm.cmake index 51d7ebd8830..6eadfc5e4f0 100644 --- a/build_files/build_environment/cmake/nasm.cmake +++ b/build_files/build_environment/cmake/nasm.cmake @@ -27,3 +27,12 @@ ExternalProject_Add(external_nasm INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make install INSTALL_DIR ${LIBDIR}/nasm ) + +if(UNIX) + # `touch nasm.1 ndisasm.1` helps to create the manual pages files, even when + # local `asciidoc` and `xmlto` packages are not installed. + ExternalProject_Add_Step(external_nasm after_configure + COMMAND ${CMAKE_COMMAND} -E touch ${BUILD_DIR}/nasm/src/external_nasm/nasm.1 ${BUILD_DIR}/nasm/src/external_nasm/ndisasm.1 + DEPENDEES configure + ) +endif() -- cgit v1.2.3