On 2007-04-19 15:25-0400 Bill Hoffman wrote:

Vitor Vasconcelos Araujo Silva wrote:



[...]So, the question: Is it possible to control this kind of dependecies/behavior from CMakeLists files?

Yes. Look up ADD_DEPENDENCIES at http://cmake.org/HTML/Documentation.html.

Alan

Thanks Alan, but it doesn't help. If I use it, I cannot build the Visual Studio project, because the dependence is a library that I intend to build inside my project. Well, maybe I'm doing something wrong, but I almost sure I cannot add a library as a dependence before have it built. So, my problem continues...
    Thanks a lot,
You are doing something wrong, but with out some more examples it is hard to tell what. add_dependency should not be required.

Sorry for that poor advice.  I sent off that post too quickly.  Bill is
correct (as usual!).

You should have something like this:

add_library(foo ...)
add_exectuable(bar ...)
target_link_libraries(bar foo)

I am guessing you have something like this:
target_link_libraries(bar /some/path/to/foo) So, cmake is not treating foo as a target that it knows how to build, but rather an external library that is assumed to exist.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to