What's the best method to retrieve include files from Git ?

Hello,

I have a Git repository where there are two directories. The first one contain only .h file.
I have two needs (especially the first one):

  • I want to download them in comsusing projects. ExternalProject_Add() ? FetchContent_Declare()/FetchContent_Make_Avalaible() ? file(DOWNLOAD ...) ?
    I guess it should be ExternalProject_Add() for the second one, but maybe and other function for the first one.

  • The first directory is supposed to be consumed by C project, and the second one by C++ projects. Would it be possible to download only one of them according the consuming project’s language ?