Skip to content

Commit

Permalink
[arrow] Fix CMake link error (microsoft#22387)
Browse files Browse the repository at this point in the history
* [arrow] Fix CMake link error

* update version

* [arrow] update vcpkg-cmake-wrapper.cmake

* update version

Co-authored-by: Lily Wang <[email protected]>
  • Loading branch information
2 people authored and rhuijben committed Jan 25, 2022
1 parent 9f5986d commit 378a018
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ports/arrow/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,15 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/arrow)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake")

configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

file(GLOB PARQUET_FILES ${CURRENT_PACKAGES_DIR}/share/${PORT}/Parquet*)
file(COPY ${PARQUET_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/share/parquet")
file(REMOVE_RECURSE ${PARQUET_FILES})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/FindParquet.cmake ${CURRENT_PACKAGES_DIR}/share/parquet/FindParquet.cmake)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

Expand Down
7 changes: 7 additions & 0 deletions ports/arrow/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The package arrow provides CMake targets:

find_package(Arrow CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${ARROW_LIBRARIES})

find_package(Parquet CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${PARQUET_LIBRARIES})
9 changes: 9 additions & 0 deletions ports/arrow/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
_find_package(${ARGS})

if(TARGET arrow_static)
list(APPEND ARROW_LIBRARIES arrow_static)
list(APPEND PARQUET_LIBRARIES parquet_static)
elseif (TARGET arrow_shared)
list(APPEND ARROW_LIBRARIES arrow_shared)
list(APPEND PARQUET_LIBRARIES parquet_shared)
endif()
1 change: 1 addition & 0 deletions ports/arrow/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "arrow",
"version": "6.0.1",
"port-version": 1,
"description": "Cross-language development platform for in-memory analytics",
"homepage": "https://arrow.apache.org",
"supports": "x64 | (arm64 & !windows)",
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/arrow.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b12626f29cb0ba8a049241153af0dfeca9a810d7",
"version": "6.0.1",
"port-version": 1
},
{
"git-tree": "a192a94717139642a1e9304cdc1ae86850398fb9",
"version": "6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
},
"arrow": {
"baseline": "6.0.1",
"port-version": 0
"port-version": 1
},
"ashes": {
"baseline": "2021-06-18",
Expand Down

0 comments on commit 378a018

Please sign in to comment.