OpenColorIO skips find_package for some 3rd party dependencies when "PackageName_ROOT" is defined
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- cmake, cpp
- 领域
- build-system
调研方向
首先检查 issue 中提到的自定义 FindPackageName.cmake 实现,尤其是 yaml-cpp 示例,并将其中的 PackageName_ROOT guards 与 CMake 的 find_package 文档进行比较。确定该 guard 是否是有意设计的,并明确预期行为;完成后应解决 issue 中提出的问题。
由索引模型根据 Issue 内容生成。
描述
OpenColorIO has some 3rd party dependencies for which custom "FindPackageName.cmake" files have been written. Examples: yaml-cpp, Imath, minizip-ng,... These all check if the "PackageName_ROOT" variable is defined and if not they call find_package(PackageName).
For example for yaml-cpp:
# Search for yaml-cpp-config.cmake
if(NOT DEFINED yaml-cpp_ROOT)
find_package(yaml-cpp ${yaml-cpp_FIND_VERSION} CONFIG ${quiet})
endif()
The CMake documentation of find_package states however that the location referred to by the variable "PackageName_ROOT" is searched first to find the package. In our build setup we do set this variable so that find_package commands will find the appropriate version (i.e., the one we build from source). Because of "if(NOT DEFINED...)" the find_package call is skipped in this case, which is unexpected behavior for us.
What is the reasoning behind this implementation? At first sight it doesn't seem to comply with the CMake docs.
- 主要语言
- C++
- 星标
- 2.1k
- 派生
- 513
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AcademySoftwareFoundation/OpenColorIO 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 61/100
AcademySoftwareFoundation/OpenColorIO#2364 · 1 条评论 ·
-
Inconsistent run-time library usage for locale handling breaks GPU code generation on some systems.未关闭
难度 2/5 1-3 小时 新手友好度 86/100
AcademySoftwareFoundation/OpenColorIO#2351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
Build failure on GCC/MinGW (MXE): std::ifstream constructor mismatch with Platform::filenameToUTF()未关闭
难度 2/5 1-3 小时 新手友好度 78/100
查看 AcademySoftwareFoundation/OpenColorIO 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
mw00/project-maya#1368 ·
维护者通常 2 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
tenstorrent/tt-metal#67662 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
maplibre/maplibre-native#5159 ·
维护者通常 1 天内回复
-
enhancement question
难度 2/5 1-3 小时 新手友好度 72/100
lbr-stack/lbr_fri_ros2_stack#420 · 1 条评论 ·