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")
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)
set(CLIENT_MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/client.manifest")
else()
@ -2537,7 +2537,7 @@ if(SERVER)
)
set(SERVER_SRC ${ENGINE_SERVER} ${GAME_SERVER} ${GAME_GENERATED_SERVER})
if(TARGET_OS STREQUAL "windows")
set(SERVER_ICON "other/icons/DDNet-Server.rc")
set(SERVER_ICON "other/icons/${SERVER_EXECUTABLE}.rc")
else()
set(SERVER_ICON)
endif()