From 91612efc9d0f88c55228a78a2d82a925021a2c65 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 10 Jun 2011 20:45:44 +0000 Subject: [PATCH] [CMAKE] add macro to concatenate 2 files. So far only for windows. svn path=/trunk/; revision=52179 --- reactos/CMakeMacros.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/reactos/CMakeMacros.cmake b/reactos/CMakeMacros.cmake index 2c1a5781fa8..197a0cff656 100644 --- a/reactos/CMakeMacros.cmake +++ b/reactos/CMakeMacros.cmake @@ -199,3 +199,22 @@ function(add_executable name) _add_executable(${name} ${ARGN}) add_clean_target(${name}) endfunction() + +if(WIN32) + macro(to_win_path _cmake_path _native_path) + string(REPLACE "/" "\\" ${_native_path} "${_cmake_path}") + endmacro() + + macro(concatenate_files _file1 _file2 _output) + to_win_path("${_file1}" _real_file1) + to_win_path("${_file2}" _real_file2) + to_win_path("${_output}" _real_output) + add_custom_command( + OUTPUT ${_output} + COMMAND cmd.exe /C "copy /Y ${_real_file1} + ${_real_file2} ${_real_output}" + DEPENDS ${_file1} + DEPENDS ${_file2}) + endmacro() +else() + +endif()