AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

Q: CMake config files and interdependencies

Open
#1,192 4 comments 0 reactions 0 assignees View on GitHub
bug build help wanted
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

Hi,

OTIO 0.14.0

I got approached with a question today, because in CMake, someone had done

```
find_package(OpenTimelineIO REQUIRED)
```

resulting in the error
```
CMake Error at CMakeLists.txt:326 (find_package):
Found package configuration file:

/share/opentimelineio/OpenTimelineIOConfig.cmake

but it set OpenTimelineIO_FOUND to FALSE so package "OpenTimelineIO" is
considered to be NOT FOUND. Reason given by package:

The following imported targets are referenced, but are missing:
OTIO::opentime
```
due to the `opentimelineio` import target requiring `opentime`.

I hadn't seen this in my own testing, because I had done
```
find_package(OpenTime REQUIRED)
find_package(OpenTimelineIO REQUIRED)
```
(although I can't find that in documentation from a quick browse, so I must've just figured it out at the time.)

It's brought up the subsequent question of why are there _two_ different CMake config files exported during the build?

I'm not aware of any technical restrictions of exporting two libraries in a single config file, even if you only consume one.

I'm curious if there was a particular need for them to be separate?
Thanks

Contributor guide

Open the contributing guide

Research direction

Start by inspecting CMakeLists.txt around line 326 and the generated OpenTimelineIOConfig.cmake and OpenTime configuration files. Reproduce the two find_package sequences shown in the issue, then determine the intended dependency behavior and whether the exported targets or their documentation need to be updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.