Cmake executable name

2019-03-25 01:29发布

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?

标签: cmake
2条回答
祖国的老花朵
2楼-- · 2019-03-25 02:12

Have you tried using SET_TARGET_PROPERTIES and using the OUTPUT_NAME property?

查看更多
\"骚年 ilove
3楼-- · 2019-03-25 02:18

I bit more explicit:

set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "your name")
查看更多
登录 后发表回答