Use cmake interface library

Fixes #33.

This PR uses cmake's interface library feature:

  An INTERFACE library target does not directly create build output,
  though it may have properties set on it and it may be installed,
  exported and imported.

This makes it easier to include the header only library in a cmake
project. After using add_subdirectory on the cxxopts directory, one
simply needs to include cxxopts in their target_link_libraries, which
will allow the user's target to inherit the properties of the cxxopts
header library (see changes to example and test).
This commit is contained in:
Mario Badr
2016-12-03 07:50:14 +11:00
committed by Jarryd Beck
parent f6bd09df63
commit e005d07656
5 changed files with 21 additions and 12 deletions
+1421
View File
File diff suppressed because it is too large Load Diff