fix(cmake): client no longer opens with console

This commit is contained in:
maelstrom 2025-08-12 00:26:16 +02:00
parent 56ffc3f88c
commit 2fec4cc7f2

View file

@ -11,4 +11,14 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy_directory COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/assets ${CMAKE_SOURCE_DIR}/assets
$<TARGET_FILE_DIR:client>/assets) $<TARGET_FILE_DIR:client>/assets)
endif()
set_target_properties(client PROPERTIES
WIN32_EXECUTABLE ON
)
# https://stackoverflow.com/a/73899349/16255372
if (WIN32)
# /ENTRY:mainCRTStartup keeps the same "main" function instead of requiring "WinMain"
target_link_options(client PRIVATE "/ENTRY:mainCRTStartup")
endif() endif()