PROJECT(share)

FUNCTION(K3D_ADD_SHARE_FILES PATTERN TARGET)
	FILE(GLOB FILE_LIST ${PATTERN})

	FILE(MAKE_DIRECTORY ${K3D_SHARE_OUTPUT_DIRECTORY}/${TARGET})
	FOREACH(FILE ${FILE_LIST})
		CONFIGURE_FILE(${FILE} ${K3D_SHARE_OUTPUT_DIRECTORY}/${TARGET} COPYONLY)
	ENDFOREACH()

	INSTALL(FILES ${FILE_LIST} DESTINATION share/${TARGET})
ENDFUNCTION()

K3D_ADD_SUBDIRECTORY(man REQUIRES K3D_BUILD_DOCS)
ADD_SUBDIRECTORY(k3d)

