Skip to content

An example project showing the usage of cmake find_package()

License

Notifications You must be signed in to change notification settings

gatzka/find_package_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it?

This is an example project showing the usage of cmake's find_package(). There are four projects:

  • foo: a simple library
  • foo_user: an executable using library foo
  • bar: a simple library using foo
  • bar_user: an executable using library bar

In essence, bar_user has a transitive dependency to library foo via library bar. It looks that cmake's install(EXPORT ...) commands don't emit statements to handle transitive dependencies out-of-the-box.

Therefore, we let install(EXPORT ...) generate a "private" config file and install a self-written "public" config file which handles the transitive dependency.

Please have a look into bar/CMakeLists.txt and bar/barConfig.cmake

About

An example project showing the usage of cmake find_package()

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published