This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 493f08c0e4 GH-43591: [C++][GLib] Don't install 
arrow-cuda.pc/arrow-cuda-glib.pc on Windows (#43593)
493f08c0e4 is described below

commit 493f08c0e4baa7e9f229965ced4c4e988857f76e
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sat Aug 10 14:50:51 2024 +0900

    GH-43591: [C++][GLib] Don't install arrow-cuda.pc/arrow-cuda-glib.pc on 
Windows (#43593)
    
    ### Rationale for this change
    
    Because `cuda.pc` that is required by `arrow-cuda.pc` doesn't exist on 
Windows.
    
    ### What changes are included in this PR?
    
    Don't install `arrow-cuda.pc`/`arrow-cuda-glib.pc` on Windows. Users should 
use ArrowCUDA CMake package instead of pkg-config on Windows.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #43591
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 c_glib/arrow-cuda-glib/meson.build | 17 +++++++++--------
 cpp/src/arrow/gpu/CMakeLists.txt   |  7 +++++--
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/c_glib/arrow-cuda-glib/meson.build 
b/c_glib/arrow-cuda-glib/meson.build
index 47bed70f03..36730dec6c 100644
--- a/c_glib/arrow-cuda-glib/meson.build
+++ b/c_glib/arrow-cuda-glib/meson.build
@@ -58,14 +58,15 @@ libarrow_cuda_glib = library('arrow-cuda-glib',
 arrow_cuda_glib = declare_dependency(link_with: libarrow_cuda_glib,
                                      include_directories: 
base_include_directories,
                                      dependencies: dependencies)
-
-pkgconfig.generate(libarrow_cuda_glib,
-                   description: 'C API for Apache Arrow CUDA based on GLib',
-                   filebase: 'arrow-cuda-glib',
-                   name: 'Apache Arrow CUDA GLib',
-                   requires: ['arrow-glib', 'arrow-cuda'],
-                   variables: pkgconfig_variables,
-                   version: version)
+if target_machine.system() != 'windows'
+  pkgconfig.generate(libarrow_cuda_glib,
+                     description: 'C API for Apache Arrow CUDA based on GLib',
+                     filebase: 'arrow-cuda-glib',
+                     name: 'Apache Arrow CUDA GLib',
+                     requires: ['arrow-glib', 'arrow-cuda'],
+                     variables: pkgconfig_variables,
+                     version: version)
+endif
 
 if have_gi
   gir_dependencies = [
diff --git a/cpp/src/arrow/gpu/CMakeLists.txt b/cpp/src/arrow/gpu/CMakeLists.txt
index 4821603437..7f8650c7dc 100644
--- a/cpp/src/arrow/gpu/CMakeLists.txt
+++ b/cpp/src/arrow/gpu/CMakeLists.txt
@@ -47,11 +47,14 @@ endif()
 
 set(ARROW_CUDA_SRCS cuda_arrow_ipc.cc cuda_context.cc cuda_internal.cc 
cuda_memory.cc)
 
+set(ARROW_CUDA_PKG_CONFIG_NAME_ARGS)
+if(NOT WINDOWS)
+  list(APPEND ARROW_CUDA_PKG_CONFIG_NAME_ARGS PKG_CONFIG_NAME arrow-cuda)
+endif()
 add_arrow_lib(arrow_cuda
               CMAKE_PACKAGE_NAME
               ArrowCUDA
-              PKG_CONFIG_NAME
-              arrow-cuda
+              ${ARROW_CUDA_PKG_CONFIG_NAME_ARGS}
               SOURCES
               ${ARROW_CUDA_SRCS}
               OUTPUTS

Reply via email to