mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-23 17:38:54 +02:00
Don't enforce shared library build only on Windows. It might well make
2008-04-03 Tor Lillqvist <tml@novell.com> * configure.in: Don't enforce shared library build only on Windows. It might well make sense to build static libraries in some use cases. * glib/gutils.c: Don't compile the DllMain if building libglib statically. Also in that case don't return NULL from _glib_get_installation_directory(), but return the installation directory of the program's .exe file. svn path=/trunk/; revision=6818
This commit is contained in:
committed by
Tor Lillqvist
parent
fd54a90954
commit
285b31e7a5
@@ -134,6 +134,8 @@ const guint glib_binary_age = GLIB_BINARY_AGE;
|
||||
|
||||
static HMODULE glib_dll = NULL;
|
||||
|
||||
#ifdef DLL_EXPORT
|
||||
|
||||
BOOL WINAPI
|
||||
DllMain (HINSTANCE hinstDLL,
|
||||
DWORD fdwReason,
|
||||
@@ -145,12 +147,18 @@ DllMain (HINSTANCE hinstDLL,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
gchar *
|
||||
_glib_get_installation_directory (void)
|
||||
{
|
||||
#ifdef DLL_EXPORT
|
||||
if (glib_dll == NULL)
|
||||
return NULL;
|
||||
|
||||
#endif
|
||||
/* In a static build of GLib just use the application's .exe file's
|
||||
* installation directory...
|
||||
*/
|
||||
return g_win32_get_package_installation_directory_of_module (glib_dll);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user