[CMake] FILE command in make_custom_target

Philippe Fremy phil at freehackers.org
Sun Jun 17 06:41:12 EDT 2007


	Hi,

I want a directory to be built when a custom target is executed.

I tried something like this:

	add_custom_target(
		doc_libyzis
		COMMAND FILE( MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../apidoc )
		COMMAND ${DOXYGEN} libyzis.doxy
		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
	        COMMENT "Building libyzis api documentation"
	)



and several variation but none would work.

Then I thought that I should make the directory creation a rule, with my
 custom target depending on it. But to create a new rule, I need
add_custom_command and I am back to square 1.

Is there any way to achieve what I want ?

	regards,

	Philippe





More information about the CMake mailing list