Cmake executable name

2019-03-25 02:16发布

问题:

How can I set the executable name in CMake?

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?

回答1:

Have you tried using SET_TARGET_PROPERTIES and using the OUTPUT_NAME property?



回答2:

I bit more explicit:

set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "your name")


标签: cmake