[CMake] Question about CMakeLists.txt with regards to installation

Jeremy Strange alaterale at elitemail.org
Tue Oct 12 18:08:50 EDT 2004


Hi!
Thanks for the quick reply on that, both of you, I really appreciate it!
:)
That helped me a lot, I couldn't figure out how to use INSTALL_FILES
from the docs.  I got my headers installing fine now, right where I want
them.  The only other problem I'm having is that my library is not being
installed.  Here's the relevant section of CMakeLists.txt (root):
<<
INSTALL_TARGETS(/lib/${PNAME} LibGraphics2D LibUtility)
>>
where PNAME has been defined as my library name.
Here's the CMakeLists.txt file in the build dir I have where my
libraries are compiled:
<<
## Graphics2D
ADD_LIBRARY(LibGraphics2D Graphics2D.cpp)

## Utility
ADD_LIBRARY(LibUtility Utility.cpp)
>>
Am I doing something wrong here?  The libraries get compiled, I see
their .a files, but nothing is getting placed in /usr/local/lib/${PNAME}
Do I have to specify the .a extension?
Thanks,
J

On Tue, 12 Oct 2004 17:53:16 -0400, "Brad King" <brad.king at kitware.com>
said:
> Andy Cedilnik wrote:
> 
> > Hi Jeremy,
> > 
> > Try:
> > 
> > SET(files 
> >   foo.h
> >   bar.h
> >   ...
> > )
> > 
> > INSTALL_FILES(/include/vtk .h ${files})
> 
> ...and for the library:
> 
> INSTALL_TARGETS(/lib/mylibdir mylib)
> 
> -Brad
> 
____________

All of us are looking at the sky, but some of us are looking at the stars.



More information about the CMake mailing list