fix library names in engine
authoralfadur
Mon, 15 Oct 2018 21:40:32 +0300
changeset 13943 3a0d09a31f5f
parent 13942 939641cdb94f
child 13944 4d63acb2b978
fix library names in engine
hedgewars/CMakeLists.txt
hedgewars/LuaPas.pas
hedgewars/uPhysFSLayer.pas
--- a/hedgewars/CMakeLists.txt	Mon Oct 15 19:34:11 2018 +0200
+++ b/hedgewars/CMakeLists.txt	Mon Oct 15 21:40:32 2018 +0300
@@ -186,6 +186,10 @@
     list(APPEND sourcefiles_sofar "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
 endforeach(loop_var)
 
+if (WIN32 AND VCPKG_TOOLCHAIN)
+    add_definitions(-dWIN32_VCPKG)
+endif()
+
 
 #SOURCE AND PROGRAMS SECTION
 if(BUILD_ENGINE_LIBRARY)
--- a/hedgewars/LuaPas.pas	Mon Oct 15 19:34:11 2018 +0200
+++ b/hedgewars/LuaPas.pas	Mon Oct 15 21:40:32 2018 +0300
@@ -14,7 +14,12 @@
 uses uConsts;
 {.$DEFINE LUA_GETHOOK}
 
-const LuaLibName = {$IFDEF LUA_INTERNAL}'libhwlua'{$ELSE}'liblua'{$ENDIF};
+const LuaLibName =
+{$IFDEF LUA_INTERNAL}
+    {$IFDEF WIN32_VCPKG}'hwlua'{$ELSE}'libhwlua'{$ENDIF}
+{$ELSE}
+    {$IFDEF WIN32_VCPKG}'lua'{$ELSE}'liblua'{$ENDIF}
+{$ENDIF};
 
 {$IFNDEF WIN32}
     {$linklib lua}
--- a/hedgewars/uPhysFSLayer.pas	Mon Oct 15 19:34:11 2018 +0200
+++ b/hedgewars/uPhysFSLayer.pas	Mon Oct 15 21:40:32 2018 +0300
@@ -5,8 +5,14 @@
 interface
 uses SDLh, LuaPas;
 
-const PhysfsLibName = {$IFDEF PHYSFS_INTERNAL}'libhwphysfs'{$ELSE}'libphysfs'{$ENDIF};
-const PhyslayerLibName = 'libphyslayer';
+const PhysfsLibName =
+{$IFDEF PHYSFS_INTERNAL}
+    'libhwphysfs'
+{$ELSE}
+    {$IFDEF WIN32_VCPKG}'physfs'{$ELSE}'libphysfs'{$ENDIF};
+{$ENDIF}
+const PhyslayerLibName =
+    {$IFDEF WIN32_VCPKG}'physlayer'{$ELSE}'libphyslayer'{$ENDIF};
 
 {$IFNDEF WIN32}
     {$linklib physfs}