Subject: CMake modernization

CMake modernization

From: Stephen Sorley <stephen.sorley_at_gmail.com>
Date: Tue, 3 Jan 2017 13:29:27 -0500

Just submitted a PR for c-ares' CMake build system, pinging the list as
requested by the contributor instructions. Here's the link:

https://github.com/c-ares/c-ares/pull/77

The proposed patch explicitly sets the minimum version to 2.8.12 (the
version provided by Ubuntu 14.04) and changes the way usage requirements
(include dirs, compile defs, etc.) are specified to match standard
practices for modern CMake (see here
<https://schneide.wordpress.com/2016/04/08/modern-cmake-with-target_link_libraries/>
for a quick overview). One of the benefits of this change is that it makes
linking against a bundled copy of libcares easier for the parent project
(see PR for a concrete example).

Does this look upstreamable to everybody? Any questions or suggested fixes
are welcome. I work at the same organization as the original contributor of
the CMake buildsystem (bradh352 <https://github.com/bradh352>), this fix is
part of a general push to modernize the CMake code we maintain.

Thanks!
Stephen Sorley
Received on 2017-01-03