From 5df714cd2272a1869fd397fae4b0c89acbf1a6c3 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Fri, 22 Jan 2021 07:31:06 +0100 Subject: [PATCH] Build: Replace explicit use of mv(1) in CMake file with file(RENAME). Also fix code style: `else ()` -> `else()`. --- Userland/Utilities/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index 242754ac5d..9352734b1b 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -7,8 +7,8 @@ foreach(CMD_SRC ${CMD_SOURCES}) add_executable("${CMD_NAME}-bin" ${CMD_SRC}) target_link_libraries("${CMD_NAME}-bin" LibCore) install(TARGETS "${CMD_NAME}-bin" RUNTIME DESTINATION bin) - install(CODE "execute_process(COMMAND mv ${CMD_NAME}-bin ${CMD_NAME} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)") - else () + install(CODE "file(RENAME ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME}-bin ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME})") + else() add_executable(${CMD_NAME} ${CMD_SRC}) target_link_libraries(${CMD_NAME} LibCore) install(TARGETS ${CMD_NAME} RUNTIME DESTINATION bin)