--- a/hedgewars/CMakeLists.txt Sat Apr 08 01:44:53 2023 +0300
+++ b/hedgewars/CMakeLists.txt Sat Apr 08 16:45:55 2023 +0300
@@ -22,6 +22,12 @@
endif()
endif(UNIX)
+# FPC 3.2.2 does not create s COFF file for the engine icon, but still includes it
+# in the list of files to be linked, leading to a linking failure
+if(${CMAKE_Pascal_COMPILER_VERSION} VERSION_GREATER_EQUAL 3.2)
+ add_flag_append(CMAKE_Pascal_FLAGS "-dSKIP_RESOURCES")
+endif()
+
# convert list into pascal array
if(FONTS_DIRS)
list(LENGTH FONTS_DIRS ndirs)
--- a/hedgewars/hwengine.pas Sat Apr 08 01:44:53 2023 +0300
+++ b/hedgewars/hwengine.pas Sat Apr 08 16:45:55 2023 +0300
@@ -19,8 +19,10 @@
{$INCLUDE "options.inc"}
{$IFDEF WINDOWS}
+{$IFNDEF SKIP_RESOURCES}
{$R res/hwengine.rc}
{$ENDIF}
+{$ENDIF}
{$IFDEF HWLIBRARY}
unit hwengine;