[gnome-builder] cmake: fixed the destination path of target
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] cmake: fixed the destination path of target
- Date: Thu, 20 Jan 2022 22:05:48 +0000 (UTC)
commit 2ecf8cfe9ec5980978b454e46a55fec4013a7702
Author: Günther Wagner <info gunibert de>
Date: Thu Jan 20 23:00:18 2022 +0100
cmake: fixed the destination path of target
src/plugins/cmake/gbp-cmake-build-target-provider.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/cmake/gbp-cmake-build-target-provider.c
b/src/plugins/cmake/gbp-cmake-build-target-provider.c
index 966f40214..825b62727 100644
--- a/src/plugins/cmake/gbp-cmake-build-target-provider.c
+++ b/src/plugins/cmake/gbp-cmake-build-target-provider.c
@@ -1,6 +1,6 @@
/* gbp-cmake-build-target-provider.c
*
- * Copyright 2021 Günther Wagner <info gunibert de>
+ * Copyright 2021-2022 Günther Wagner <info gunibert de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -63,8 +63,11 @@ gbp_cmake_build_target_provider_create_target (GbpCmakeBuildTargetProvider *sel
JsonObject *path_object;
JsonObject *install;
JsonObject *prefix;
+ JsonArray *destination_array;
+ JsonObject *destination;
const gchar *artefacts_path;
const gchar *prefix_path;
+ const gchar *destination_path;
g_return_if_fail (GBP_IS_CMAKE_BUILD_TARGET_PROVIDER (self));
@@ -80,9 +83,12 @@ gbp_cmake_build_target_provider_create_target (GbpCmakeBuildTargetProvider *sel
install = json_object_get_object_member (obj, "install");
prefix = json_object_get_object_member (install, "prefix");
prefix_path = json_object_get_string_member (prefix, "path");
+ destination_array = json_object_get_array_member (install, "destinations");
+ destination = json_array_get_object_element (destination_array, 0);
+ destination_path = json_object_get_string_member (destination, "path");
install_dir = g_path_get_dirname (artefacts_path);
- install_dir_abs = g_build_path (G_DIR_SEPARATOR_S, prefix_path, install_dir, NULL);
+ install_dir_abs = g_build_path (G_DIR_SEPARATOR_S, prefix_path, destination_path, NULL);
install_directory = g_file_new_for_path (install_dir_abs);
name = g_path_get_basename (artefacts_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]