summaryrefslogtreecommitdiff
path: root/src/components/interfaces/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/interfaces/CMakeLists.txt')
-rw-r--r--src/components/interfaces/CMakeLists.txt14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/components/interfaces/CMakeLists.txt b/src/components/interfaces/CMakeLists.txt
index d88bdc3d1d..7b0ec63d3a 100644
--- a/src/components/interfaces/CMakeLists.txt
+++ b/src/components/interfaces/CMakeLists.txt
@@ -30,14 +30,12 @@
# Copy RPC spec submodule files to interfaces directory
if(EXISTS ${CMAKE_SOURCE_DIR}/tools/rpc_spec/)
- execute_process(COMMAND cmp --silent ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xml ${CMAKE_CURRENT_SOURCE_DIR}/MOBILE_API.xml RESULT_VARIABLE ret)
- if(NOT ret EQUAL "0")
- execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xml ${CMAKE_CURRENT_SOURCE_DIR}/)
- endif()
- execute_process(COMMAND cmp --silent ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xsd ${CMAKE_CURRENT_SOURCE_DIR}/MOBILE_API.xsd RESULT_VARIABLE ret)
- if(NOT ret EQUAL "0")
- execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xsd ${CMAKE_CURRENT_SOURCE_DIR}/)
- endif()
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/MOBILE_API.xml)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xsd
+ ${CMAKE_CURRENT_SOURCE_DIR}/MOBILE_API.xsd)
else ()
message( FATAL_ERROR "Missing the RPC Spec submodule" )
message( FATAL_ERROR "Please run `git submodule update --init` in the SDL Core source directory" )