[CMake] Examples creating exported Makefiles and correct library link order

Lori Pritchett-Sheats lpritch at lanl.gov
Tue Jun 14 18:56:05 EDT 2011


My project needs to create and install a Makefile that other client 
projects could import to link against our project. T

 I have a simple template file that generates an exported Makefile using 
the configure_file command, however I'm struggling with how to create a 
variable that contains all the libraries our project builds and the 
correct ordering for linking. I noticed in the CMakeCache.txt file there 
are variables {target name}_LIB_DEPS  with the dependencies listed, but 
I can't find any documentation on these variables or find a way to 
access all the library target names to even read these variables.

I've looked at the Trilinos build system to see how they do this but 
it's not straightforward. Does anyone know of a smaller project that 
creates a exported Makefile that generates correct library link orders?



-- 
Lori A. Pritchett-Sheats, PhD.
CCS-2, Computational Physics and Methods
Office: 505-665-6675
Fax: 505-665-4972

Los Alamos National Laboratory
P.O. Box 1663
MS D413
Los Alamos, NM 87544



More information about the CMake mailing list