I am fairly new to CMake but am interested in using the CMake Package Management (CPM) to add a local library/source files. My question is probably simple, so please forgive.
I would like to know how to download and install shared library for zlib via a call(s) to CPMAddPackage call, then link against this downloaded package for some local C++ code. Can anyone point me to an example of this or provide some simple code that illustrates this?
Bonus question, if this is okay, I would was thinking of using Boost.Iostreams for compression/decompression via CPMAddPackage call later on, but have read that there can be issues with ZLIB and Boost.Iostreams in Windows environment. I need my code to run on both Windows and Linux environments. Does anyone have any information on this situation?