mirror of
https://github.com/reactos/CMake.git
synced 2025-04-09 02:30:50 +00:00

The custom command implementation is based on the Microsoft support article: https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-extend-the-visual-studio-build-process Fixes: #16960
14 lines
361 B
CMake
14 lines
361 B
CMake
enable_language(CSharp)
|
|
|
|
add_executable(CSharpCustomCommand dummy.cs)
|
|
|
|
add_custom_command(OUTPUT ${generatedFileName}
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${inputFileName} ${generatedFileName}
|
|
MAIN_DEPENDENCY ${inputFileName}
|
|
COMMENT "${commandComment}")
|
|
|
|
target_sources(CSharpCustomCommand PRIVATE
|
|
${inputFileName}
|
|
${generatedFileName})
|