[glib] Visual Studio builds: Use the Centricular fork of libffi



commit 951fd642dc49bbbc49f4929cfe47b643b161c992
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jun 14 10:51:55 2017 +0800

    Visual Studio builds: Use the Centricular fork of libffi
    
    The latest upstream libffi is getting bit-rotten with the Windows/MSVC
    builds, and since we are eventually moving to a Meson-based build system,
    make use of the Centricular fork of libffi[1], which is better maintained
    and tested for builds on Windows, with the use of DLLs over static libraries
    and elimination of awkward build flags that we had to use for GObject.
    
    [1]: https://github.com/centricular/libffi

 win32/vs10/README.txt                |   10 +++++-----
 win32/vs10/glib-build-defines.props  |    2 +-
 win32/vs10/gobject.vcxprojin         |    8 ++++----
 win32/vs9/README.txt                 |    9 ++++-----
 win32/vs9/glib-build-defines.vsprops |    2 +-
 win32/vs9/gobject.vcprojin           |    8 ++++----
 6 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/win32/vs10/README.txt b/win32/vs10/README.txt
index ba58789..001f86b 100644
--- a/win32/vs10/README.txt
+++ b/win32/vs10/README.txt
@@ -28,11 +28,11 @@ One may wish to build his/her own ZLib-It is recommended that ZLib is
 built using the win32/Makefile.msc makefile with VS10 with the ASM routines
 to avoid linking problems-see win32/Makefile.msc in ZLib for more details.
 
-For LibFFI, please get version 3.0.10 or later, as Visual C++ build support
-was added in the 3.0.10 release series.  Please see the README file that
-comes with the LibFFI source package for more details on how to build LibFFI
-on Visual C++-please note that the mozilla-build package from Mozilla is needed
-in order to build LibFFI on Windows.
+For LibFFI, please use the Centricular fork of it, which can be found at
+https://github.com/centricular/libffi.  Please refer to the instructions
+there on building, as it involves using the Meson build system and possibly
+the Ninja build tool if the Visual Studio project generation is not used
+or is unavailable.
 
 Please note, although using one's own existing PCRE installation to build GLib
 is possible, it is still recommended to build PCRE during the process of building
diff --git a/win32/vs10/glib-build-defines.props b/win32/vs10/glib-build-defines.props
index 6de6fec..e7606da 100644
--- a/win32/vs10/glib-build-defines.props
+++ b/win32/vs10/glib-build-defines.props
@@ -15,7 +15,7 @@
     <GLibBuildDefines>$(GLibInBuildMacro);$(DllExportDefines);G_LOG_DOMAIN="GLib"</GLibBuildDefines>
     <GThreadBuildDefines>G_LOG_DOMAIN="GThread"</GThreadBuildDefines>
     <GModuleBuildDefines>G_LOG_DOMAIN="GModule"</GModuleBuildDefines>
-    
<GObjectBuildDefines>GOBJECT_COMPILATION;$(DllExportDefines);G_LOG_DOMAIN="GLib-GObject";FFI_BUILDING</GObjectBuildDefines>
+    
<GObjectBuildDefines>GOBJECT_COMPILATION;$(DllExportDefines);G_LOG_DOMAIN="GLib-GObject"</GObjectBuildDefines>
     <GioBuildDefines>$(GioInBuildMacro);G_LOG_DOMAIN="GLib-GIO";$(DllExportDefines)</GioBuildDefines>
     <WindowsNetworkingLibs>ws2_32.lib;shlwapi.lib;dnsapi.lib;iphlpapi.lib</WindowsNetworkingLibs>
   </PropertyGroup>
diff --git a/win32/vs10/gobject.vcxprojin b/win32/vs10/gobject.vcxprojin
index 0820b07..a2de0b6 100644
--- a/win32/vs10/gobject.vcxprojin
+++ b/win32/vs10/gobject.vcxprojin
@@ -83,7 +83,7 @@
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>libffi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ffi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).dll</OutputFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(OutDir)$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).pdb</ProgramDatabaseFile>
@@ -105,7 +105,7 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>libffi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ffi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).dll</OutputFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(OutDir)$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).pdb</ProgramDatabaseFile>
@@ -132,7 +132,7 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>libffi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ffi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).dll</OutputFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(OutDir)$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).pdb</ProgramDatabaseFile>
@@ -154,7 +154,7 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>libffi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ffi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).dll</OutputFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(OutDir)$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).pdb</ProgramDatabaseFile>
diff --git a/win32/vs9/README.txt b/win32/vs9/README.txt
index 158f145..1625b71 100644
--- a/win32/vs9/README.txt
+++ b/win32/vs9/README.txt
@@ -28,11 +28,10 @@ One may wish to build his/her own ZLib-It is recommended that ZLib is
 built using the win32/Makefile.msc makefile with VS9 with the ASM routines
 to avoid linking problems-see win32/Makefile.msc in ZLib for more details.
 
-For LibFFI, please get version 3.0.10 or later, as Visual C++ build support
-was added in the 3.0.10 release series.  Please see the README file that
-comes with the LibFFI source package for more details on how to build LibFFI
-on Visual C++-please note that the mozilla-build package from Mozilla is needed
-in order to build LibFFI on Windows.
+For LibFFI, please use the Centricular fork of it, which can be found at
+https://github.com/centricular/libffi.  Please refer to the build instructions
+there on how to build it, which involves using the Meson build system, and
+the Ninja build tool.
 
 Please note, although using one's own existing PCRE installation to build GLib
 is possible, it is still recommended to build PCRE during the process of building
diff --git a/win32/vs9/glib-build-defines.vsprops b/win32/vs9/glib-build-defines.vsprops
index 7e28cc5..36fce86 100644
--- a/win32/vs9/glib-build-defines.vsprops
+++ b/win32/vs9/glib-build-defines.vsprops
@@ -65,7 +65,7 @@
        />
        <UserMacro
                Name="GObjectBuildDefines"
-               
Value="GOBJECT_COMPILATION;$(DllExportDefines);G_LOG_DOMAIN=\&quot;GLib-GObject\&quot;;FFI_BUILDING"
+               Value="GOBJECT_COMPILATION;$(DllExportDefines);G_LOG_DOMAIN=\&quot;GLib-GObject\&quot;"
        />
        <UserMacro
                Name="GioBuildDefines"
diff --git a/win32/vs9/gobject.vcprojin b/win32/vs9/gobject.vcprojin
index 1e2e97e..c4c60e7 100644
--- a/win32/vs9/gobject.vcprojin
+++ b/win32/vs9/gobject.vcprojin
@@ -38,7 +38,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="libffi.lib"
+                               AdditionalDependencies="ffi.lib"
                                OutputFile="$(OutDir)\$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).dll"
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
@@ -66,7 +66,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="libffi.lib"
+                               AdditionalDependencies="ffi.lib"
                                OutputFile="$(OutDir)\$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).dll"
                                LinkIncremental="1"
                                GenerateDebugInformation="true"
@@ -98,7 +98,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="libffi.lib"
+                               AdditionalDependencies="ffi.lib"
                                OutputFile="$(OutDir)\$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).dll"
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
@@ -126,7 +126,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="libffi.lib"
+                               AdditionalDependencies="ffi.lib"
                                OutputFile="$(OutDir)\$(GlibDllPrefix)$(ProjectName)$(GlibDllSuffix).dll"
                                LinkIncremental="1"
                                GenerateDebugInformation="true"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]