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?
add_executable is used to add all files used for this executable. If you add stuff that doesn't belong to this executable then that is a mistake as it will compile and link extra files into the executable. Now, you can put any kind of file in add_execuable and CMake will categorize these files.
Running CMake for Windows / Microsoft Visual C++ (MSVC) Run cmake-gui.exe, which should be in your Start menu under Program Files, there may also be a shortcut on your desktop, or if you built from source, it will be in the build directory.
The cmake executable is the command-line interface of the cross-platform buildsystem generator CMake. The above Synopsis lists various actions the tool can perform as described in sections below. To build a software project with CMake, Generate a Project Buildsystem.
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "your name")
documentation
Have you tried using SET_TARGET_PROPERTIES and using the OUTPUT_NAME property?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With