I am trying to use CMake to build a project that contains several modules.
project
--modules
CMakeLists.txt
--mod1
CMakeLists.txt
--src
--*.cpp
--include
--*.h
--mod2
CMakeLists.txt
--src
--*.cpp
--include
--*.h
--applications
This is similar to how openCV is structured. I am trying to write macros similar to what openCV where you simply say add_module(mod1 DEPENDS mod2)
and it would go in and recursively install mod1
and all its dependencies. I also want to be able to build specific modules. Unfortunately I am unable to find many CMake examples structured this way. The OpenCV macros are very involved and difficult to distill the basic CMake commands. Any help is appreciated!