summaryrefslogtreecommitdiff
path: root/pkg.h
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2012-05-18 08:40:38 -0700
committerDan Nicholson <dbn.lists@gmail.com>2012-05-21 21:08:49 -0700
commit7ac6f32625254a14180677694a0a98d333fc5813 (patch)
tree82ecf16d51173b58c2944dcfa3efc0e240503595 /pkg.h
parentb87359cc9b9039b30ab0f76b67fad52980b7913a (diff)
downloadpkg-config-7ac6f32625254a14180677694a0a98d333fc5813.tar.gz
Don't use deprecated glib function to construct path on win32
g_win32_get_package_installation_subdirectory() has been deprecated since GLib 2.18 and in recent (2.31) GLib versions disabled entirely by default. This patch replaces usage of that function by g_win32_get_package_installation_directory_of_module() and g_build_filename(). Use the new functions and rework the code a bit so it leaks less memory. g_win32_get_package_installation_directory_of_module() is supported since GLib 2.16. The minimal GLib version is bumped accordingly. Freedesktop #45742
Diffstat (limited to 'pkg.h')
-rw-r--r--pkg.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/pkg.h b/pkg.h
index 5749518..ef18af0 100644
--- a/pkg.h
+++ b/pkg.h
@@ -22,17 +22,6 @@
#include <glib.h>
-#ifdef G_OS_WIN32
-/* No hardcoded paths in the binary, thanks */
-/* It's OK to leak this */
-#undef PKG_CONFIG_PC_PATH
-#define PKG_CONFIG_PC_PATH \
- g_strconcat (g_win32_get_package_installation_subdirectory (NULL, NULL, "lib/pkgconfig"), \
- ";", \
- g_win32_get_package_installation_subdirectory (NULL, NULL, "share/pkgconfig"), \
- NULL)
-#endif
-
typedef enum
{
LESS_THAN,
@@ -136,6 +125,11 @@ extern gboolean disable_uninstalled;
extern char *pcsysrootdir;
+/* pkg-config default search path. On Windows the current pkg-config install
+ * directory is used. Otherwise, the build-time defined PKG_CONFIG_PC_PATH.
+ */
+extern char *pkg_config_pc_path;
+
#ifdef G_OS_WIN32
/* If TRUE, do not automatically define "prefix" while
* parsing each .pc file */