[CMake] temporary build directory for header files

James C. Sutherland James.Sutherland at utah.edu
Fri Oct 16 12:13:04 EDT 2009


I have a fairly large project where the header files from various  
subdirectories are combined into a single include directory when the  
project is installed.

For example, header "a.h" may be located in:
	/root/subproject1/
in the source tree, it is located in
	/include/MyProject/
in the installation.

However, we have some demo files that also serve as source for some  
tests.  These files expect the installed header configuration, not the  
source header configuration.  For example, they include
	#include <MyProject/a.h>
rather than
	#include <subproject/a.h>
or
	#include <a.h>

So is there a way of moving header files to a specific location in the  
build tree (like a pre-install)?  I am looking for something similar  
to setting
	CMAKE_LIBRARY_OUTPUT_DIRECTORY
for library files to collect them into one location as they are built.

Any tips would be greatly appreciated!

James


More information about the CMake mailing list