fix missing icon in executable

the Ja2.rc file needs to be in the add_executable target for the icon
to appear, and that one requires WinMain.

so get rid of dummy.cpp and put sgp/sgp.cpp in there
This commit is contained in:
Marco Antonio J. Costa
2025-01-02 08:02:52 -03:00
committed by majcosta
parent a7b0091a27
commit b908bcecb9
4 changed files with 4 additions and 6 deletions
+4 -2
View File
@@ -139,8 +139,10 @@ foreach(app IN LISTS ApplicationTargets)
foreach(lang IN LISTS LangTargets)
# executable for an application/language combination, e.g. JA2_ENGLISH.exe
set(exe ${app}_${lang})
file(WRITE dummy.cpp "")
add_executable(${exe} WIN32 dummy.cpp)
add_executable(${exe} WIN32
sgp/sgp.cpp
Ja2/Res/Ja2.rc
)
target_link_libraries(${exe} PRIVATE ${Ja2_Libraries} $<IF:${usingMsBuild},legacy_stdio_definitions.lib,>)
target_link_options(${exe} PRIVATE $<IF:${usingMsBuild},/SAFESEH:NO,>)