[CMake] using "INSTALL(CODE ..." for multiple configurations.

Campbell Barton ideasman42 at gmail.com
Sun May 29 20:58:55 EDT 2011


Checking if this is possible since its quite verbose to have the same
command 4 times, one for each configuration.

For blender3d on windows we need to extract python into the install
dir since we bundle it.

This command looks like this:
--- snip

install(
	CODE
	"
	execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir
\"${TARGETDIR_VER}/python/lib\"
		\"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
	"
	CONFIGURATIONS Release
)

--- snip

The annoyance is that the same command needs to be called 3 times,
Release/RelWithDebInfo/MinSizeRel
Is there some way to list multiple 'CONFIGURATIONS' ?

Ideally in this case Id like to have any 'Debug' extract
python32_d.tar.gz and any other configuration extract python32.tar.gz,
but a ways to have multiple configurations do one command would at
least be less verbose.

-- 
- Campbell


More information about the CMake mailing list