$OpenBSD: patch-cmake_CMakeCSharpInformation_cmake,v 1.1.1.1 2013/04/24 18:43:55 zhuk Exp $
--- cmake/CMakeCSharpInformation.cmake.orig	Thu Feb  7 14:14:00 2013
+++ cmake/CMakeCSharpInformation.cmake	Thu Feb  7 14:34:31 2013
@@ -360,9 +360,8 @@ function(install_assembly)
 
     # So we have the mono runtime and we can use gacutil (it has the -root option, which the MS version doesn't have).
     install(CODE "execute_process(COMMAND ${GACUTIL_EXECUTABLE} -i ${filename} ${package_option} -root ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac)")
-    file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac/mono)
-    file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac/mono)
     install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac/mono/ DESTINATION ${GAC_DIR} )
+    install(CODE "file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac/mono)")
 endfunction(install_assembly)
 
 set(CMAKE_CSharp_INFORMATION_LOADED 1)
