diff options
Diffstat (limited to 'cmake/src/switches.inc')
-rw-r--r-- | cmake/src/switches.inc | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/cmake/src/switches.inc b/cmake/src/switches.inc index 17ebd1b8..b9fcd2d6 100644 --- a/cmake/src/switches.inc +++ b/cmake/src/switches.inc @@ -9,14 +9,28 @@ {$ELSE} {$DEFINE Delphi} - // Delphi version numbers (ignore versions released before Delphi 6 as they miss the $IF directive): - // Delphi 6 (VER140), Delphi 7 (VER150), Delphi 8 (VER160) - // Delphi 9/2005 (VER170), Delphi 10/2006 (VER180) + // Delphi version numbers (ignore Delphi < 7 and Delphi 8 (VER160)) + + {$IF Defined(VER180)} // Delphi 2006 (=10) + {$DEFINE DELPHI_10} + {$DEFINE DELPHI_7_UP} + {$DEFINE DELPHI_9_UP} + {$DEFINE DELPHI_10_UP} + {$ELSEIF Defined(VER170)} // Delphi 2005 (=9) + {$DEFINE DELPHI_9} + {$DEFINE DELPHI_7_UP} + {$DEFINE DELPHI_9_UP} + {$ELSEIF Defined(VER150)} + {$DEFINE DELPHI_7} + {$DEFINE DELPHI_7_UP} + {$ELSE} // unsupported + {$WARN ERROR 'Unsupported compiler version'} + {$IFEND} - // the inline-procedure directive was introduced with Delphi 2005 - {$IF not (Defined(VER140) or Defined(VER150) or Defined(VER160))} + // inline directive introduced with Delphi 2005 + {$IFDEF DELPHI_9_UP} {$DEFINE HasInline} - {$IFEND} + {$ENDIF} {$ENDIF} @@ -59,8 +73,6 @@ {$DEFINE CONSOLE} {$IFEND} -{.$DEFINE UseFreetype} - // audio config {$IF Defined(HaveBASS)} {$DEFINE UseBASSPlayback} |