• Chun-wei Fan's avatar
    meson: Fix Visual Studio DLL builds · 39ef0bf7
    Chun-wei Fan authored
    Unfortunately, Visual Studio builds do not really like the concept of
    linking 2 static libraries and not using any sources for building a
    given DLL (it will not include those items when linking the final DLL as
    it will optimize most of the items out as the linker does not believe
    those items are being really used in the final DLL), so we need to do
    the following for the Visual Studio builds:
    
    -Define a separate GtkSourceView shared library target that contain the
     core sources *and* the word completion provider sources, along with the
     generated glib-mkenums and GResource sources.  This is actually how the
     Visual Studio projects build the sources for the GtkSourceView DLL, due
     to the same reasoning.
    
    -Declare the various internal dependencies accordingly; note that we
     still need the static core library for building the test programs.
     This means that on Visual Studio builds we need to build the core
     sources 2 times, it seems that this is unavoidable at this point.
     The build files for the tests in tests/ and testsuite/ has been updated
     accordingly so that things will build and link.  Note that for the
     test-stylescheme test, we need to ensure that we only link to the
     static core library, otherwise it will fail to link.
    
    -Update the enumeration source generating process, so that we include
     config.h during the build and so ensure that the symbols in the
     enumeration sources are properly exported.  This is necessary
     especially for the introspection builds on Visual Studio, as well as
     for the test programs.
    
    -For builds prior to Visual Studio 2013, we must include our math.h so
     that we can have a fallback implementation for round(), which is only
     provided in Visual Studio 2013 and later.
    39ef0bf7