1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +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,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)