Nitish Upreti
Nitish Upreti

Reputation: 6550

Configuring a CMake project with dependencies on multiple other CMAKE projects

I have a CMAKE project that depends on other projects built with CMAKE. These are : glfw, oglplus, portaudio etc.

How should I set up my project to work well in a cross platform fashion? What is the recommended way to go about it? I have been trying to read the CMAKE documentation but could only find examples to simple scenarios.

Upvotes: 0

Views: 74

Answers (1)

Youka
Youka

Reputation: 2705

  • Just add the dependencies to your project README and expect the user stored them (already compiled) in system scope.
  • Add CMake options to request the path to dependency files.
  • Use add_subdirectory to chain your project with dependencies.

Upvotes: 2

Related Questions