fix(cmake): client no longer opens with console
This commit is contained in:
parent
56ffc3f88c
commit
2fec4cc7f2
1 changed files with 10 additions and 0 deletions
|
@ -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()
|
Loading…
Add table
Reference in a new issue