[CMake] Different LIBRARY_OUTPUT_PATH
Brad King
brad.king at kitware.com
Mon Mar 6 14:53:17 EST 2006
Anton Deguet wrote:
> I am having some problems with a project for which I defined different
> LIBRARY_OUTPUT_PATH. Basically, I have a default LIBRARY_OUTPUT_PATH
> defined in my root CMakeLists.txt and, in a subdirectory "examples", I
> have a new definition of LIBRARY_OUTPUT_PATH so that all the libraries
> related to my examples programs go in a different place.
>
> On Windows with .net 2003, this works fine. On linux, with gmake, I can
> configure but at compilation time I get the error:
>
> make[3]: *** No rule to make target `examples/lib/libcisstCommon.a',
> needed by `examples/bin/errorHandling'. Stop.
>
> This is simply because "libcisstCommon.a" is actually compiled and
> stored as `lib/libcisstCommon.a` as defined in the root CMakeLists.txt.
>
> So, am I allowed to redefine LIBRARY_OUTPUT_PATH, and if not, how can I
> specify that I want some libraries in one directory and others in
> another directory?
In CMake 2.2 (current release) and earlier one is only allowed a single
LIBRARY_OUTPUT_PATH for the entire build tree. I think the CVS version
of CMake allows a per-directory setting but a test for the feature has
not yet been written.
-Brad
More information about the CMake
mailing list