[CMake] Build Dependencies problem

Eric Tellefsen eric.tellefsen at db.com
Tue Jul 14 14:46:16 EDT 2009


Hi,

I'm new to the list and relatively new to CMake.  I'm currently in the 
process of attempting to migrate an existing project to CMake (from plain 
Unix makefiles)

The source files for each library are in a series of subdirectories as 
illustrated in the simple diagrams at the bottom of the mail.

What I'm currently doing is creating CMakeLists.txt for each individual 
library.  I am also trying to represent the inter-library dependencies by 
adding add_subdirectory() and add_dependencies() to each library project 
(which almost all do).

However, when I try to do this, it does not work as in the case where lib3 
is dependent on lib & headers within lib2.  When I run 'cmake .' to build 
the files, I get a message telling me that lib2 is not a subdirectory of 
lib3 and  the makefile is not created.

Would someone be able to point me in the right direction?

Thank you,

Eric

The physical source tree looks like this (limiting this to libs)

Libs
   |
   - lib1
   |
   = lib2
   |
   _ etc..

The lib hierarchy looks like this

Lib1
      |
      Lib2
          |
          Lib3

so lib2 depends on Lib1 and Lib3 depends on lib 2

---
This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication
in error) please notify the sender immediately and destroy this
communication. Any unauthorized copying, disclosure or distribution of the
material in this communication is strictly forbidden.

Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090714/f7662cc2/attachment-0001.htm>


More information about the CMake mailing list