1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:27:45 +00:00

Build: Replace explicit use of mv(1) in CMake file with file(RENAME).

Also fix code style: `else ()` -> `else()`.
This commit is contained in:
Emanuele Torre 2021-01-22 07:31:06 +01:00 committed by Andreas Kling
parent 7980268b7b
commit 5df714cd22

View file

@ -7,7 +7,7 @@ foreach(CMD_SRC ${CMD_SOURCES})
add_executable("${CMD_NAME}-bin" ${CMD_SRC}) add_executable("${CMD_NAME}-bin" ${CMD_SRC})
target_link_libraries("${CMD_NAME}-bin" LibCore) target_link_libraries("${CMD_NAME}-bin" LibCore)
install(TARGETS "${CMD_NAME}-bin" RUNTIME DESTINATION bin) 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)") install(CODE "file(RENAME ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME}-bin ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME})")
else() else()
add_executable(${CMD_NAME} ${CMD_SRC}) add_executable(${CMD_NAME} ${CMD_SRC})
target_link_libraries(${CMD_NAME} LibCore) target_link_libraries(${CMD_NAME} LibCore)