4 ms·
If your project uses CMake, you could * add the structopt repository as a git submodule to your project * add something like `add_subdirectory(structopt)` to
by f00zz 6y ago
If your project uses CMake, you could
* add the structopt repository as a git submodule to your project
* add something like `add_subdirectory(structopt)` to your top-level CMake script
* add structopt to your target_link_libraries
and you're good to go.
- skrebbel 6y agoYou could do that if you wanted to use git submodules as a sort of poor man's package manager. But given that it's a header-only library, you can also just download the files, put them in your repo somewhere, and #include them.
- chrisdalke 6y agoIf this is something you do in CMake projects, check out FetchContent_Declare — newer CMake versions have this command which downloads a git repository and caches it. I much prefer this to manually downloading the files, even for header-only libraries. The command provided a nice declarative way of adding a dependency.
- f00zz 6y agoThanks!