[Cmake] simple cmake queries

Neil Killeen Neil.Killeen at atnf.csiro.au
Mon Dec 9 21:35:10 EST 2002


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




More information about the CMake mailing list