I tried using set(EXECUTABLE_OUTPUT_PATH "...")
, but that only specifies the directory where the executable is created. I also need to change the name of the executable itself. How can I do this?
2 Answers
Put the following statement after the target is defined (i.e. after the add_executable
or add_library
)
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "your name")
See the documentation for more details.