enable_language(C) add_executable(Win32GenEx main.c) set_target_properties(Win32GenEx PROPERTIES WIN32_EXECUTABLE $ ) target_compile_definitions(Win32GenEx PRIVATE $<$:USE_WIN32_MAIN>)