0

I need vs project to have commandline option as /ENTRY:"mainCRTStartup". To achieve need to know the cmake commands. Could you please let me know what all cmake changes to achieve this.

1 Answers1

0

You would need to use the set_target_properties() function to add the ENTRY link flag.

set_target_properties(target PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"" ...)

A lot of people trnd to forget about escaping the quotes around mainCRTStartup. Note: The "..." symbolizes any additional link flags you'd like to set. If you have additional link flags, wrap the quotes around all the link flags together.

This should typically be done after your add_executable/add_library call.

Chris
  • 2,254
  • 8
  • 22