AcademySoftwareFoundation / AcademySoftwareFoundation/OpenImageIO
[FEATURE REQUEST] Make finding ptex more flexible
- Dominant language
- C++
- Stars
- 2.4k
- Forks
- 698
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 48
Description
**Is your feature request related to a problem? Please describe.**
The available options for finding ptex can be too rigid for some setups. The issue stems from` PTEX_LOCATION` being used for both headers and libraries, with additions also being added to any path being passed in.
If `PTEX_INCLUDE_DIR` is passed to cmake, it gets overridden by `find_path()`, same with passing `PTEX_LIBRARY`.
**Describe the solution you'd like**
I would suggest a similar approach to that used in [FindFFmpeg](https://github.com/OpenImageIO/oiio/blob/master/src/cmake/modules/FindFFmpeg.cmake#L23), checking for `PTEX_INCLUDE_DIR` and `PTEX_LIBRARY` and only searching if these are not set.
Contributor guide
Research direction
Start by locating the CMake logic that finds ptex and compare its behavior with the linked FindFFmpeg.cmake approach. Verify the PTEX_INCLUDE_DIR and PTEX_LIBRARY inputs are preserved and that searching occurs only when those variables are unset; done means explicit paths are no longer overridden.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100