> From: cmake-boun...@cmake.org on behalf of Yifei Li > Sent: Tue 6/8/2010 3:23 PM > To: cmake@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 _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake