# HG changeset patch # User koda # Date 1361818115 -3600 # Node ID e96bf10216ef5b5aba7d8d8c956c1d74e01cc446 # Parent 342f7af2eea5de8983c456de36bdc5926798df1b on windows fpc-linking is the funniest of all diff -r 342f7af2eea5 -r e96bf10216ef CMakeLists.txt --- a/CMakeLists.txt Mon Feb 25 10:03:35 2013 +0100 +++ b/CMakeLists.txt Mon Feb 25 19:48:35 2013 +0100 @@ -306,8 +306,10 @@ message(STATUS "PhysFS will be provided by the bundled sources") set(physfs_output_name "hw_physfs") add_subdirectory(misc/libphysfs) - #-XLA is a 'beta' fpc flag that will rename libraries before passing them to the linker - list(APPEND pascal_flags "-XLAphysfs=${physfs_output_name}") + #-XLA is a beta fpc flag that renames libraries before passing them to the linker + #we also have to pass PHYSFS_INTERNAL to satisfy windows runtime requirements + #(should be harmless on other platforms) + list(APPEND pascal_flags "-XLAphysfs=${physfs_output_name}" "-dPHYSFS_INTERNAL") endif() # diff -r 342f7af2eea5 -r e96bf10216ef hedgewars/uPhysFSLayer.pas --- a/hedgewars/uPhysFSLayer.pas Mon Feb 25 10:03:35 2013 +0100 +++ b/hedgewars/uPhysFSLayer.pas Mon Feb 25 19:48:35 2013 +0100 @@ -3,7 +3,7 @@ interface uses SDLh, LuaPas; -const PhysfsLibName = 'libphysfs'; +const PhysfsLibName = {$IFDEF PHYSFS_INTERNAL}'libhw_physfs'{$ELSE}'libphysfs'{$ENDIF}; const PhyslayerLibName = 'libphyslayer'; {$IFNDEF WIN32}