AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO

Build external dependencies with FetchContent

Aperta
#1,638 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Build Issue help wanted
Lingua principale
C++
Stelle
2.1k
Fork
505
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When we are missing external dependencies and `OCIO_INSTALL_EXT_PACKAGES` has been set to `MISSING` or `ALL` , we use CMake [ExternalProject](https://cmake.org/cmake/help/latest/module/ExternalProject.html) to build these locally. This works but tends to be hard to manage correctly with modern CMake library that can export a number of targets as well as custom commands and probably other items. We also have a lot of manual CMake flags passing from the main project to the external ones, that are easy to miss.

An example of this would be OpenEXR which export more than 5 different targets we have to manually create, at the risk of getting out of sync when something changes upstream. Another case is pybind11 which export custom commands like `pybind11_add_module` which we cannot currently use in the build because it will not be there when pybind11 has been built locally I believe.

For well behaved modern CMake dependencies, it may be good to look into [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) instead, which behave similar to `add_subdirectory` and make the integration easier.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando la gestione attuale di ExternalProject da parte di CMake per OCIO_INSTALL_EXT_PACKAGES, quindi confronta le esigenze di integrazione di OpenEXR e pybind11 con FetchContent. Il lavoro è completato quando le dipendenze moderne possono esporre i propri target e comandi senza l’attuale replica manuale e i comportamenti MISSING e ALL continuano a funzionare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cmake, cpp
Ambito
build-system
Tipo di issue
Refactoring
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.