mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
ScmRevGen: Refactor file configuration into a function
This commit is contained in:
parent
d3cf35019c
commit
1cb6ce6057
@ -42,11 +42,15 @@ if(NOT DOLPHIN_WC_REVISION)
|
|||||||
set(DOLPHIN_WC_COMMITS_AHEAD_MASTER 0)
|
set(DOLPHIN_WC_COMMITS_AHEAD_MASTER 0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file(
|
function(configure_source_file path)
|
||||||
"${PROJECT_SOURCE_DIR}/Source/Core/Common/scmrev.h.in"
|
configure_file(
|
||||||
"${PROJECT_BINARY_DIR}/Source/Core/Common/scmrev.h.tmp"
|
"${PROJECT_SOURCE_DIR}/${path}.in"
|
||||||
)
|
"${PROJECT_BINARY_DIR}/${path}.tmp"
|
||||||
|
)
|
||||||
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PROJECT_BINARY_DIR}/Source/Core/Common/scmrev.h.tmp" "${PROJECT_BINARY_DIR}/Source/Core/Common/scmrev.h")
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PROJECT_BINARY_DIR}/${path}.tmp" "${PROJECT_BINARY_DIR}/${path}")
|
||||||
|
|
||||||
file(REMOVE "${PROJECT_BINARY_DIR}/Source/Core/Common/scmrev.h.tmp")
|
file(REMOVE "${PROJECT_BINARY_DIR}/${path}.tmp")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
configure_source_file("Source/Core/Common/scmrev.h")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user