# HG changeset patch # User alfadur # Date 1680961555 -10800 # Node ID 668c88b31dd6cf6b57df9cfd47ea8771ac32c166 # Parent 4ec24af5909a84a298bbde97ff3d86aae0b13099 workaround for FPC 3.2.2 linking bug diff -r 4ec24af5909a -r 668c88b31dd6 hedgewars/CMakeLists.txt --- 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) diff -r 4ec24af5909a -r 668c88b31dd6 hedgewars/hwengine.pas --- 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;