Pick icon files based on executable name

convenience for downstream projects that renamed the client or server

Co-authored-by: Paul <paul.turkovskiy@gmail.com>
This commit is contained in:
ChillerDragon 2023-03-09 10:34:55 +01:00
parent 2222a1df57
commit c801df311c

View file

@ -2342,7 +2342,7 @@ if(CLIENT)
if(TARGET_OS STREQUAL "windows") if(TARGET_OS STREQUAL "windows")
configure_file("other/manifest/client.manifest.in" "client.manifest") configure_file("other/manifest/client.manifest.in" "client.manifest")
set(CLIENT_ICON "other/icons/DDNet.rc") set(CLIENT_ICON "other/icons/${CLIENT_EXECUTABLE}.rc")
if(NOT MINGW) if(NOT MINGW)
set(CLIENT_MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/client.manifest") set(CLIENT_MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/client.manifest")
else() else()
@ -2537,7 +2537,7 @@ if(SERVER)
) )
set(SERVER_SRC ${ENGINE_SERVER} ${GAME_SERVER} ${GAME_GENERATED_SERVER}) set(SERVER_SRC ${ENGINE_SERVER} ${GAME_SERVER} ${GAME_GENERATED_SERVER})
if(TARGET_OS STREQUAL "windows") if(TARGET_OS STREQUAL "windows")
set(SERVER_ICON "other/icons/DDNet-Server.rc") set(SERVER_ICON "other/icons/${SERVER_EXECUTABLE}.rc")
else() else()
set(SERVER_ICON) set(SERVER_ICON)
endif() endif()