[CMake] Copy includes + Library config

Pablo Odorico pablo.odorico at gmail.com
Wed Oct 4 14:27:02 EDT 2006


On Wednesday 04 October 2006 14:33, you wrote:
> Pablo Odorico wrote:
> > How can I use cmake to copy the library headers in a portable way?
> > (eg: /usr/include/pgl/*.h in linux)
> >
> > Is there a way to run ldconfig after "make install" so the library can be
> > used right away? Will that affect  the install in a non-unix OS?
>
> Look at the INSTALL command.  It can install libraries, executables,
> headers, and run custom code at install time.

This:
# Copia de headers
IF(UNIX)
	SET(INCLUDE_DIR "/usr/include/pgl/")
ELSE(UNIX)
	SET(INCLUDE_DIR "include/")
ENDIF(UNIX)

INSTALL(CODE "MESSAGE(\"Installing headers...\")")
INSTALL(FILES
	alpha.h color.h	light.h
	material.h pgl.h texture.h
 	transform.h util.h vec2.h
 	vec3.h vec4.h window.h
DESTINATION ${INCLUDE_DIR})

... did what I wanted.

Shouldn't install_manifest.txt include created directories? 
/usr/include/pgl/ is automatically by INSTALL created but it isn't there

-- 
Pablo Odorico
http://pablo.etype.com.ar/


More information about the CMake mailing list