Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -720,13 +720,9 @@ endif()

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../LICENSE.txt
${CMAKE_CURRENT_SOURCE_DIR}/../NOTICE.txt
${CMAKE_CURRENT_SOURCE_DIR}/README.md
DESTINATION "${ARROW_DOC_DIR}"
COMPONENT arrow_doc)
${CMAKE_CURRENT_SOURCE_DIR}/README.md DESTINATION "${ARROW_DOC_DIR}")

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gdb_arrow.py
DESTINATION "${ARROW_GDB_DIR}"
COMPONENT arrow_gdb)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gdb_arrow.py DESTINATION "${ARROW_GDB_DIR}")

#
# Validate and print out Arrow configuration options
Expand Down
17 changes: 3 additions & 14 deletions cpp/cmake_modules/BuildUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,10 @@ function(arrow_install_cmake_package PACKAGE_NAME EXPORT_NAME)
write_basic_package_version_file("${BUILT_CONFIG_VERSION_CMAKE}"
COMPATIBILITY SameMajorVersion)
install(FILES "${BUILT_CONFIG_CMAKE}" "${BUILT_CONFIG_VERSION_CMAKE}"
DESTINATION "${ARROW_CMAKE_DIR}/${PACKAGE_NAME}"
COMPONENT config_cmake_file)
DESTINATION "${ARROW_CMAKE_DIR}/${PACKAGE_NAME}")
set(TARGETS_CMAKE "${PACKAGE_NAME}Targets.cmake")
install(EXPORT ${EXPORT_NAME}
DESTINATION "${ARROW_CMAKE_DIR}/${PACKAGE_NAME}"
COMPONENT config_cmake_export
NAMESPACE "${PACKAGE_NAME}::"
FILE "${TARGETS_CMAKE}")
endfunction()
Expand Down Expand Up @@ -405,11 +403,8 @@ function(ADD_ARROW_LIB LIB_NAME)
install(TARGETS ${LIB_NAME}_shared ${INSTALL_IS_OPTIONAL}
EXPORT ${LIB_NAME}_targets
ARCHIVE DESTINATION ${INSTALL_ARCHIVE_DIR}
COMPONENT ${LIB_NAME}_shared_archive
LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
COMPONENT ${LIB_NAME}_shared_library
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR}
COMPONENT ${LIB_NAME}_shared_runtime
INCLUDES
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
Expand Down Expand Up @@ -476,11 +471,8 @@ function(ADD_ARROW_LIB LIB_NAME)
install(TARGETS ${LIB_NAME}_static ${INSTALL_IS_OPTIONAL}
EXPORT ${LIB_NAME}_targets
ARCHIVE DESTINATION ${INSTALL_ARCHIVE_DIR}
COMPONENT ${LIB_NAME}_static_library
LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
COMPONENT ${LIB_NAME}_static_library
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR}
COMPONENT ${LIB_NAME}_static_library
INCLUDES
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
Expand Down Expand Up @@ -942,9 +934,7 @@ function(ARROW_INSTALL_ALL_HEADERS PATH)
endif()
list(APPEND PUBLIC_HEADERS ${HEADER})
endforeach()
install(FILES ${PUBLIC_HEADERS}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PATH}"
COMPONENT ${HEADER}_header)
install(FILES ${PUBLIC_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PATH}")
endfunction()

function(ARROW_ADD_PKG_CONFIG MODULE)
Expand All @@ -954,8 +944,7 @@ function(ARROW_ADD_PKG_CONFIG MODULE)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${MODULE}.pc"
INPUT "${CMAKE_CURRENT_BINARY_DIR}/${MODULE}.pc.generate.in")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${MODULE}.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/"
COMPONENT ${MODULE}_pkg_config)
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
endfunction()

# Implementations of lisp "car" and "cdr" functions
Expand Down
13 changes: 5 additions & 8 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ function(provide_cmake_module MODULE_NAME ARROW_CMAKE_PACKAGE_NAME)
message(STATUS "Providing CMake module for ${MODULE_NAME} as part of ${ARROW_CMAKE_PACKAGE_NAME} CMake package"
)
install(FILES "${module}"
DESTINATION "${ARROW_CMAKE_DIR}/${ARROW_CMAKE_PACKAGE_NAME}"
COMPONENT ${MODULE_NAME}_module)
DESTINATION "${ARROW_CMAKE_DIR}/${ARROW_CMAKE_PACKAGE_NAME}")
endif()
endfunction()

Expand Down Expand Up @@ -2444,22 +2443,20 @@ function(build_gtest)
endforeach()
install(DIRECTORY "${googletest_SOURCE_DIR}/googlemock/include/"
"${googletest_SOURCE_DIR}/googletest/include/"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
COMPONENT gtest_dir)
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
add_library(arrow::GTest::gtest_headers INTERFACE IMPORTED)
target_include_directories(arrow::GTest::gtest_headers
INTERFACE "${googletest_SOURCE_DIR}/googlemock/include/"
"${googletest_SOURCE_DIR}/googletest/include/")
install(TARGETS gmock gmock_main gtest gtest_main
EXPORT arrow_testing_targets
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT gtest_runtime
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT gtest_archive
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT gtest_library)
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
if(MSVC)
install(FILES $<TARGET_PDB_FILE:gmock> $<TARGET_PDB_FILE:gmock_main>
$<TARGET_PDB_FILE:gtest> $<TARGET_PDB_FILE:gtest_main>
DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT gtest_pdb
OPTIONAL)
endif()
add_library(arrow::GTest::gmock ALIAS gmock)
Expand Down
13 changes: 4 additions & 9 deletions cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,7 @@ string(REPLACE "${CMAKE_BINARY_DIR}" "<CMAKE_BINARY_DIR>" REDACTED_CXX_FLAGS
configure_file("util/config.h.cmake" "util/config.h" ESCAPE_QUOTES)
configure_file("util/config_internal.h.cmake" "util/config_internal.h" ESCAPE_QUOTES)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/util/config.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/util"
COMPONENT arrow_config)
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/util")

set(ARROW_SRCS
builder.cc
Expand Down Expand Up @@ -1052,8 +1051,7 @@ if(ARROW_BUILD_BUNDLED_DEPENDENCIES)
get_target_property(arrow_bundled_dependencies_path arrow_bundled_dependencies
IMPORTED_LOCATION)
install(FILES ${arrow_bundled_dependencies_path} ${INSTALL_IS_OPTIONAL}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT arrow_bundled_dependencies)
DESTINATION ${CMAKE_INSTALL_LIBDIR})
string(PREPEND ARROW_PC_LIBS_PRIVATE " -larrow_bundled_dependencies")
list(INSERT ARROW_STATIC_INSTALL_INTERFACE_LIBS 0 "Arrow::arrow_bundled_dependencies")
endif()
Expand Down Expand Up @@ -1170,7 +1168,6 @@ if(ARROW_BUILD_SHARED AND NOT WIN32)
if(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libarrow_gdb.py"
DESTINATION "${ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_DIR}"
COMPONENT arrow_gdb
RENAME "$<TARGET_FILE_NAME:arrow_shared>-gdb.py")
endif()
endif()
Expand Down Expand Up @@ -1234,13 +1231,11 @@ arrow_install_all_headers("arrow")

config_summary_cmake_setters("${CMAKE_CURRENT_BINARY_DIR}/ArrowOptions.cmake")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ArrowOptions.cmake
DESTINATION "${ARROW_CMAKE_DIR}/Arrow"
COMPONENT arrow_options_cmake)
DESTINATION "${ARROW_CMAKE_DIR}/Arrow")

# For backward compatibility for find_package(arrow)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/arrow-config.cmake
DESTINATION "${ARROW_CMAKE_DIR}/Arrow"
COMPONENT arrow_config_cmake)
DESTINATION "${ARROW_CMAKE_DIR}/Arrow")

#
# Unit tests
Expand Down
36 changes: 16 additions & 20 deletions cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,25 +115,22 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
# GH-47876 TODO: set up `flight_sql_odbc_lib` component for macOS Installer
# GH-47877 TODO: set up `flight_sql_odbc_lib` component for Linux Installer
if(WIN32)
install(DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}${CMAKE_BUILD_TYPE}/"
# Install ODBC and its Arrow dependencies
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION bin
COMPONENT flight_sql_odbc_lib
FILES_MATCHING
# Use regex for dll name patterns with versions
PATTERN "abseil_dll.dll"
PATTERN "arrow.dll"
PATTERN "arrow_compute.dll"
PATTERN "arrow_flight.dll"
PATTERN "arrow_flight_sql.dll"
PATTERN "arrow_flight_sql_odbc.dll"
PATTERN "boost_locale*.dll"
PATTERN "cares.dll"
PATTERN "libcrypto*.dll"
PATTERN "libprotobuf.dll"
PATTERN "libssl*.dll"
PATTERN "re2.dll"
PATTERN "utf8proc.dll"
PATTERN "zlib1.dll")
COMPONENT arrow_flight_sql_odbc)
install(TARGETS arrow_shared
arrow_compute_shared
arrow_flight_shared
arrow_flight_sql_shared
arrow_flight_sql_odbc_shared
RUNTIME_DEPENDENCIES
PRE_EXCLUDE_REGEXES
"api-ms-.*"
"ext-ms-.*"
POST_EXCLUDE_REGEXES
".*system32/.*\\.dll"
RUNTIME DESTINATION bin COMPONENT arrow_flight_sql_odbc)

set(CPACK_WIX_EXTRA_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/install/windows/arrow-flight-sql-odbc.wxs")
Expand All @@ -145,8 +142,7 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
endif()

get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
set(CPACK_COMPONENTS_ALL Unspecified)
list(APPEND CPACK_COMPONENTS_ALL "flight_sql_odbc_lib")
set(CPACK_COMPONENTS_ALL "arrow_flight_sql_odbc")

if(WIN32)
# WiX msi installer on Windows
Expand Down
Loading