[Cmake] simple cmake queries

Ian Scott ian.m.scott at stud.man.ac.uk
Tue Dec 10 05:03:53 EST 2002


There is a an LIBRARIES_OUTPUT_PATH variable in CMake. I don't know exactly
what it defaults to, but if you set it to blank it will put each library in
the same place as the Makefile that produces it.
You can edit the variable in ccmake (or in CMakeCache.txt if you prefer.) Or
You can set it in your root CMakeLists.txt file using
SET(LIBRARIES_OUTPUT_PATH /home/my/lib)

Ian S.

> -----Original Message-----
> From: Neil Killeen [mailto:Neil.Killeen at atnf.csiro.au]
> Sent: Tuesday, December 10, 2002 2:35 AM
> To: cmake at public.kitware.com
> Subject: [Cmake] simple cmake queries
>
>
> Hello
>
> i am doing my first cmake configuration.
>
> I have created a directory structure for my
> project and have created the CMakeLists.txt files.
>
> I have one simple question at this point.
>
> My directory structure looks like this (Unix)
>
> Project
>   Source
>     Code
>       Modules
>         Module1
>         Module2
>       Applications
>         App1
>         App2
>   Binary
>     sun4sol
>       lib
>       bin
>     linux
>       lib
>       bin
>
>
> a pretty simple structure.
>
>
>
> The ADD_LIBRARY command -  by some miracle, the libraries that
> I created from the Modules code tree, were put in the correct
> binary location.  E.g. sun4sol/lib
>
> However, I did not, as far as I can see, tell the CMakeLists.txt
> files, where to put them.
>
> I used a cmake command like
>
> # Add to module library
>    ADD_LIBRARY(medimModule1 Greetings)
>
>   which appears to have done several things
>
>    . create the library medimModule1 in the sun4sol/lib area
>    . add the object file Greetings.o
>    . run ranlib
>
>
>   My only guess is that since I ran cmake from the sun4sol directory,
>   it has automatically assumed that it should put the library in
>   the subdirectory 'lib'.  Is that correct ?   Docs. should say this
>   if so.
>
>   I would prefer that  I specify explicitly where it goes.
> How do I do
>   that ?    I could not find a command to specify this.
>
>
> thanks
> Neil
>
> _______________________________________________
> Cmake mailing list
> Cmake at public.kitware.com
> http://public.kitware.com/mailman/listinfo/cmake
>





More information about the CMake mailing list