[CMake] INSTALL with RENAME
cmake.org › pipermail › cmakeHow do I install a single target as multiple names? (for something like busybox)------ CMakeLists.txt -----------cmake_minimum_required(VERSION 2.8)PROJECT( test )add_executable( ${PROJECT_NAME} test.c )install( TARGETS ${PROJECT_NAME} RUNTIME DESTINATION . RENAME util_rm.exe )install( TARGETS ${PROJECT_NAME} RUNTIME DESTINATION . RENAME util_ls.exe )install( TARGETS ${PROJECT_NAME} RUNTIME DESTINATION .
[CMake] INSTALL with RENAME
cmake.org › pipermail › cmakeMay 26, 2011 · AFAIK, the RENAME clause isn't available for the INSTALL(TARGETS ...) signature, and when using INSTALL(CODE|SCRIPT ...), you will probably lose the INSTALL() command's advanced features, e.g. the COMPONENT or CONFIGURATIONS clause. Therefore, I'd suggest to create the symlinks/ copies already in the build tree via a POST_BUILD custom command and
install — CMake 3.23.0-rc4 Documentation
cmake.org › cmake › helpRENAME Specify a name for an installed file that may be different from the original file. Renaming is allowed only when a single file is installed by the command. OPTIONAL Specify that it is not an error if the file to be installed does not exist. New in version 3.1: Command signatures that install files may print messages during installation.