From 951e900a3220fcb8479dfa06ffeb43d3b7efd980 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 2 Jul 2021 17:18:46 +0100 Subject: [PATCH] fix libdir directory guessing on windows --- libvips/iofuncs/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index 34b705e8..a07c87d6 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -1217,10 +1217,12 @@ vips_guess_libdir( const char *argv0, const char *env_name ) * * The lib directory name can be eg. "lib", "lib64" etc. depending on * the platform, so copy that from the configure-time libdir if we can. + * The configure-time LIBDIR is generated by autotools and always uses + * '/', even on Windows. */ if( strcmp( prefix, VIPS_PREFIX ) == 0 ) libdir = VIPS_LIBDIR; - else if( (suffix = strrchr( VIPS_LIBDIR, G_DIR_SEPARATOR )) ) + else if( (suffix = strrchr( VIPS_LIBDIR, '/' )) ) libdir = g_strdup_printf( "%s%s", prefix, suffix ); else libdir = g_strdup_printf( "%s/lib", prefix );