[CMake] dependency problem
Torri, Stephen CIV NSWCDD, W15
stephen.torri at navy.mil
Tue Jun 8 15:57:49 EDT 2010
> From: cmake-bounces at cmake.org on behalf of Yifei Li
> Sent: Tue 6/8/2010 3:23 PM
> To: cmake at cmake.org
> Subject: [CMake] dependency problem
>
> Hi folks,
>
> I'm new to cmake, can anyone help me with the following situation:
>
> I have a project which will generate following targets: 1) the application and a shared library, say MyLib. 2) some
> plugins(which are also shared libraries) that need to link MyLib, each plugin has its own cmakelists.txt
>
> The problem is when CMakeLists.txt for a plugin is parsed, MyLib does not exist.
>
> What is the correct way to handle this situation?
So the plugin depends on MyLib. I would look at adding a add_dependcies to the plugin CMakeLists.txt.
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_dependencies
Stephen
More information about the CMake
mailing list