Change the dll lookup directory when building with CMake on Win32.

This commit is contained in:
John Ralls 2017-06-15 15:45:53 -07:00
parent 3d12dd9cf9
commit 1f31ca620e
2 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,7 @@
/* Template file for processing by the cmake command CONFIGURE_FILE */
/* If we're using this file it's a CMAKE build, so say so */
#define CMAKE_BUILD 1
/* Define if building universal (internal helper macro) */
#cmakedefine AC_APPLE_UNIVERSAL_BUILD

View File

@ -86,8 +86,17 @@ gnc_engine_init_part2()
}, *lib;
if (uninstalled)
#ifdef CMAKE_BUILD
pkglibdir = g_build_path (G_DIR_SEPARATOR_S, builddir, NULL);
#ifdef WIN32
#define LIBDIR "bin"
#else
#define LIBDIR "lib"
#endif
#else
pkglibdir = g_build_path (G_DIR_SEPARATOR_S, builddir,
"src", "backend", NULL);
#endif
else
pkglibdir = gnc_path_get_pkglibdir ();
@ -95,8 +104,12 @@ gnc_engine_init_part2()
{
gchar *libdir;
if (uninstalled)
#ifdef CMAKE_BUILD
libdir = g_build_path (G_DIR_SEPARATOR_S, pkglibdir, LIBDIR, NULL);
#else
libdir = g_build_path (G_DIR_SEPARATOR_S, pkglibdir,
lib->subdir, ".libs", NULL);
#endif
else
libdir = pkglibdir;
if (qof_load_backend_library(libdir, lib->lib))