From 3f20ecef468597df82b0154f7334786aec06be1a Mon Sep 17 00:00:00 2001 From: kuba Date: Thu, 20 Jun 2024 17:06:52 -0700 Subject: [PATCH] Added extra step to config Makefile which forces Cmake to reconfigure once building with BUILD_MISSING_DEPS=1 completes. This is necessary as CMake does not detect Imath include directory and errors during build. Signed-off-by: kuba --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 30f1506a48..a5fed37d37 100644 --- a/Makefile +++ b/Makefile @@ -207,7 +207,7 @@ ifneq (${CLANG_FORMAT_EXCLUDES},) endif ifneq (${BUILD_MISSING_DEPS},) - MY_CMAKE_FLAGS += -DBUILD_MISSING_DEPS:BOOL=${BUILD_MISSING_DEPS} + MY_CMAKE_FLAGS += -DOpenImageIO_BUILD_MISSING_DEPS:STRING=all endif @@ -236,6 +236,8 @@ profile: # generating makefiles to build the project. For speed, it only does this when # ${build_dir}/Makefile doesn't already exist, in which case we rely on the # cmake generated makefiles to regenerate themselves when necessary. +# When building missing dependencies, once configuration step completes, +# rerun the configuration so that CMake rescans newly installed packages. config: @ (if [ ! -e ${build_dir}/${BUILDSENTINEL} ] ; then \ ${CMAKE} -E make_directory ${build_dir} ; \ @@ -243,6 +245,9 @@ config: ${CMAKE} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} \ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ ${MY_CMAKE_FLAGS} ${working_dir} ; \ + if [ "${BUILD_MISSING_DEPS}" = "1" ] ; then \ + ${CMAKE} ${working_dir} ; \ + fi ; \ fi)