summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-10-17 10:53:30 +0100
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-10-17 10:53:30 +0100
commit8aa15da7ed34e82b331825f1af9548275dbeff09 (patch)
tree5d642c7fc2fcc1e6a5e06390a0eb1f1bb1f9ad3a
parent6f5e7573e297bb1aa10cbed1b8172b427205b402 (diff)
downloadfpGUI-8aa15da7ed34e82b331825f1af9548275dbeff09.tar.xz
Fixes build error about units not for a specific target.
Because the X11 and GDI targets have units with the same names (ie: fpg_impl.pas etc) the last enry overrides the platform target. So if we compile under Linux, it will complain that fpg_impl.pas is for the Windows target only. To work around this problem, we have to add some units in code blocks for specific targets.
-rw-r--r--src/fpmake.pp35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/fpmake.pp b/src/fpmake.pp
index 616f7f8b..a0424dd1 100644
--- a/src/fpmake.pp
+++ b/src/fpmake.pp
@@ -151,24 +151,29 @@ begin
{ corelib/x11 }
- T := P.Targets.AddUnit('fpg_keyconv_x11.pas', AllUnixOSes);
- T := P.Targets.AddUnit('fpg_netlayer_x11.pas', AllUnixOSes);
- T := P.Targets.AddUnit('fpg_xft_x11.pas', AllUnixOSes);
- T := P.Targets.AddUnit('fpg_impl.pas', AllUnixOSes);
- T := P.Targets.AddUnit('fpg_x11.pas', AllUnixOSes);
- T.Dependencies.AddUnit('fpg_xft_x11');
- T.Dependencies.AddUnit('fpg_netlayer_x11');
- T.Dependencies.AddUnit('fpg_base');
- T.Dependencies.AddUnit('fpg_impl');
- T := P.Targets.AddUnit('fpg_interface.pas', AllUnixOSes);
+ if Defaults.OS in AllUnixOSes then
+ begin
+ T := P.Targets.AddUnit('fpg_keyconv_x11.pas', AllUnixOSes);
+ T := P.Targets.AddUnit('fpg_netlayer_x11.pas', AllUnixOSes);
+ T := P.Targets.AddUnit('fpg_xft_x11.pas', AllUnixOSes);
+ T := P.Targets.AddUnit('fpg_impl.pas', AllUnixOSes);
+ T := P.Targets.AddUnit('fpg_x11.pas', AllUnixOSes);
+ T.Dependencies.AddUnit('fpg_xft_x11');
+ T.Dependencies.AddUnit('fpg_netlayer_x11');
+ T.Dependencies.AddUnit('fpg_base');
+ T.Dependencies.AddUnit('fpg_impl');
+ T := P.Targets.AddUnit('fpg_interface.pas', AllUnixOSes);
+ end;
{ corelib/gdi }
- T := P.Targets.AddUnit('fpg_impl.pas', AllWindowsOSes);
- T := P.Targets.AddUnit('fpg_gdi.pas', AllWindowsOSes);
- T.Dependencies.AddInclude('fpg_keys_gdi.inc', AllWindowsOSes);
- T := P.Targets.AddUnit('fpg_interface.pas', AllWindowsOSes);
-
+ if Defaults.OS in AllWindowsOSes then
+ begin
+ T := P.Targets.AddUnit('fpg_impl.pas', AllWindowsOSes);
+ T := P.Targets.AddUnit('fpg_gdi.pas', AllWindowsOSes);
+ T.Dependencies.AddInclude('fpg_keys_gdi.inc', AllWindowsOSes);
+ T := P.Targets.AddUnit('fpg_interface.pas', AllWindowsOSes);
+ end;
{ gui/db }
T := P.Targets.AddUnit('fpgui_db.pas');