diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2074c92a34..49b0e1eae6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -389,6 +389,7 @@ jobs: OIIO_CMAKE_FLAGS=-DUSE_PYTHON=0 LLVM_VERSION=17.0.6 LLVM_DISTRO_NAME=ubuntu-22.04 SKIP_SYSTEM_DEPS_INSTALL=1 QT_VERSION=0 + OpenImageIO_BUILD_MISSING_DEPS=none runs-on: ${{ matrix.runner }} env: diff --git a/src/cmake/build_Robinmap.cmake b/src/cmake/build_Robinmap.cmake index 1aa96d9751..88e1249bcc 100644 --- a/src/cmake/build_Robinmap.cmake +++ b/src/cmake/build_Robinmap.cmake @@ -22,3 +22,4 @@ set (Robinmap_ROOT ${Robinmap_INSTALL_DIR}) # Signal to caller that we need to find again at the installed location set (Robinmap_REFIND TRUE) +set (Robinmap_VERSION ${Robinmap_BUILD_VERSION}) diff --git a/src/cmake/dependency_utils.cmake b/src/cmake/dependency_utils.cmake index bbb4174bea..8426c2cb39 100644 --- a/src/cmake/dependency_utils.cmake +++ b/src/cmake/dependency_utils.cmake @@ -18,6 +18,7 @@ set_cache (${PROJECT_NAME}_BUILD_LOCAL_DEPS "" set_cache (${PROJECT_NAME}_LOCAL_DEPS_ROOT "${PROJECT_BINARY_DIR}/deps" "Directory were we do local builds of dependencies") list (APPEND CMAKE_PREFIX_PATH ${${PROJECT_NAME}_LOCAL_DEPS_ROOT}/dist) +include_directories(BEFORE ${${PROJECT_NAME}_LOCAL_DEPS_ROOT}/include) # Build type for locally built dependencies. Default to the same build type # as the current project. @@ -39,6 +40,7 @@ endif () # Track all build deps we find with checked_find_package set (CFP_ALL_BUILD_DEPS_FOUND "") +set (CFP_EXTERNAL_BUILD_DEPS_FOUND "") # Track all build deps we failed to find with checked_find_package set (CFP_ALL_BUILD_DEPS_NOTFOUND "") @@ -74,24 +76,38 @@ function (print_package_notfound_report) if (CFP_ALL_BUILD_DEPS_NOTFOUND OR CFP_ALL_BUILD_DEPS_BADVERSION) message (STATUS) message (STATUS "${ColorBoldYellow}=========================================================================${ColorReset}") + message (STATUS "${ColorBoldYellow}= Dependency report =${ColorReset}") + message (STATUS "${ColorBoldYellow}=========================================================================${ColorReset}") message (STATUS) - if (CFP_ALL_BUILD_DEPS_NOTFOUND) - message (STATUS "${ColorBoldWhite}The following dependencies were not found:${ColorReset}") - foreach (_pkg IN LISTS CFP_ALL_BUILD_DEPS_NOTFOUND) - if (_pkg IN_LIST CFP_LOCALLY_BUILT_DEPS) - message (STATUS " ${_pkg} ${ColorMagenta}(BUILT LOCALLY)${ColorReset}") - else () - message (STATUS " ${_pkg}") - endif () + if (CFP_EXTERNAL_BUILD_DEPS_FOUND) + message (STATUS "${ColorBoldWhite}The following dependencies found externally:${ColorReset}") + list (SORT CFP_EXTERNAL_BUILD_DEPS_FOUND CASE INSENSITIVE) + list (REMOVE_DUPLICATES CFP_EXTERNAL_BUILD_DEPS_FOUND) + foreach (_pkg IN LISTS CFP_EXTERNAL_BUILD_DEPS_FOUND) + message (STATUS " ${_pkg} ${${_pkg}_VERSION}") endforeach () endif () if (CFP_ALL_BUILD_DEPS_BADVERSION) message (STATUS "${ColorBoldWhite}The following dependencies were found but were too old:${ColorReset}") + list (SORT CFP_ALL_BUILD_DEPS_BADVERSION CASE INSENSITIVE) + list (REMOVE_DUPLICATES CFP_ALL_BUILD_DEPS_BADVERSION) foreach (_pkg IN LISTS CFP_ALL_BUILD_DEPS_BADVERSION) if (_pkg IN_LIST CFP_LOCALLY_BUILT_DEPS) - message (STATUS " ${_pkg} ${ColorMagenta}(BUILT LOCALLY)${ColorReset}") + message (STATUS " ${_pkg} ${${_pkg}_NOT_FOUND_EXPLANATION} ${ColorMagenta}(${${_pkg}_VERSION} BUILT LOCALLY)${ColorReset}") + else () + message (STATUS " ${_pkg} ${${_pkg}_NOT_FOUND_EXPLANATION}") + endif () + endforeach () + endif () + if (CFP_ALL_BUILD_DEPS_NOTFOUND) + message (STATUS "${ColorBoldWhite}The following dependencies were not found:${ColorReset}") + list (SORT CFP_ALL_BUILD_DEPS_NOTFOUND CASE INSENSITIVE) + list (REMOVE_DUPLICATES CFP_ALL_BUILD_DEPS_NOTFOUND) + foreach (_pkg IN LISTS CFP_ALL_BUILD_DEPS_NOTFOUND) + if (_pkg IN_LIST CFP_LOCALLY_BUILT_DEPS) + message (STATUS " ${_pkg} ${_${_pkg}_version_range} ${${_pkg}_NOT_FOUND_EXPLANATION} ${ColorMagenta}(${${_pkg}_VERSION} BUILT LOCALLY)${ColorReset}") else () - message (STATUS " ${_pkg}") + message (STATUS " ${_pkg} ${_${_pkg}_version_range} ${${_pkg}_NOT_FOUND_EXPLANATION}") endif () endforeach () endif () @@ -159,6 +175,13 @@ function (reject_out_of_range_versions pkgname pkgversion versionmin versionmax # if (${pkgname}_local_build_script_exists) # list (APPEND CFP_LOCALLY_BUILDABLE_DEPS_BADVERSION ${pkgname}) # endif () + if (versionmax VERSION_GREATER_EQUAL 10000) + set (${pkgname}_NOT_FOUND_EXPLANATION + "(found ${pkgversion}, needed >= ${versionmin})" PARENT_SCOPE) + else () + set (${pkgname}_NOT_FOUND_EXPLANATION + "(found ${pkgversion}, needed ${versionmin} ... ${versionmax})" PARENT_SCOPE) + endif () unset (${pkgname}_FOUND PARENT_SCOPE) unset (${pkgname}_VERSION PARENT_SCOPE) unset (${pkgname}_INCLUDE PARENT_SCOPE) @@ -370,7 +393,9 @@ macro (checked_find_package pkgname) reject_out_of_range_versions (${pkgname} ${${pkgname}_VERSION} ${_pkg_VERSION_MIN} ${_pkg_VERSION_MAX} _pkg_version_in_range) - if (NOT _pkg_version_in_range) + if (_pkg_version_in_range) + list (APPEND CFP_EXTERNAL_BUILD_DEPS_FOUND ${pkgname}) + else () message (STATUS "${ColorRed}${pkgname} ${${pkgname}_VERSION} is outside the required range ${_pkg_VERSION_MIN}...${_pkg_VERSION_MAX} ${ColorReset}") list (APPEND CFP_ALL_BUILD_DEPS_BADVERSION ${pkgname}) if (${pkgname}_local_build_script_exists) @@ -454,7 +479,7 @@ macro (checked_find_package pkgname) message (STATUS "${ColorRed}Not using ${pkgname} -- disabled ${_disablereason} ${ColorReset}") endif () endif () - unset (_${pkgname}_version_range) + # unset (_${pkgname}_version_range) endmacro()