mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 08:30:21 +00:00
[CMAKE]
add macro to concatenate 2 files. So far only for windows. svn path=/trunk/; revision=52179
This commit is contained in:
parent
58fca73e26
commit
91612efc9d
1 changed files with 19 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue