On adding external projects and libraries, using Boost as a primary learning vehicle
I'm relatively new to CMake and I'm trying to use https://github.com/veikkoeeva/cmaketest as a learning vehicle. My goal is to make a small, but sufficiently self-contained "Hello, World" project with a few other added projects. It looks to me this e-mail list might be a format suitable for a few starter questions and maybe a few follow-up ones if anyone has the time and inclination for little hand-holdng.
I have a few clear problems and then some others that I don't fully understand or that I'm not even aware of. For instance, I would to compile and add Boost headers and libraries dynamically, but I wouldn't like to have the Boost libraries to show in the IDE projects. Other less obvious is the libraries are added to the linker paths twice, which comes from my incomplete understanding of CMake build steps, I assume. The script has other mistakes too, I think, in how I add manually some Boost paths that perhaps could use less trouble (but the Boost build is a separate thing, so it might be required anyhow). Or in find_package(Boost).
Could anyone give advice, hints, fragments etc. on how to deal with the issues? I think I try to complete this endeavor by adding an already compiled library dependency (such as OpenSSL, Sodium or LevelDb, that are common occurrences) and a source include at some point, so in that sense too understanding this Boost case looks like prevalent. And then after that adding tests, for instance. I made a question related to this at http://stackoverflow.com/questions/41674055/running-externalproject-add-in-configure-time-or-preventing-it-from-running-ever too, but as noted, it looks like to make an e-mail list perhaps would be a more appropriate vehicle.
So, to recap:
How could I add Boost as downloading dynamically, perhaps using ExternalProject_Add and compile it, but then not having it in the IDE projects but having the headers and compiled libraries included appropriately. I would appreciate even a slick code example "doing it right" so as not to just learn one way of hacking things together.