--- 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()
#
--- 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}