WillAyd opened a new issue, #49090: URL: https://github.com/apache/arrow/issues/49090
### Describe the bug, including details regarding any error messages, version, and platform. The way CMake installs Arrow on Windows does not following CMake's requirements for subsequently finding config files. The consequence of this is that the default find_package() calls from third parties will fail to find arrow libraries correctly. The [CMake Docs](https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure) list the patterns by which find_package will discover files like `ArrowConfig.cmake` and `ArrowComputeConfig.cmake`. Some patterns are Windows-only, some are Unix-only. The cross-platform search paths are: ``` <prefix>/<name>*/(lib/<arch>\|lib*\|share)/cmake/<name>*/ <prefix>/<name>*/(lib/<arch>\|lib*\|share)/<name>*/ <prefix>/<name>*/(lib/<arch>\|lib*\|share)/<name>*/(cmake\|CMake)/ ``` When the CMAKE_INSTALL_PREFIX is not override, Arrow installs configs for the main library and compute to: ``` C:/Program Files/arrow/lib/cmake/Arrow/ArrowConfig.cmake C:/Program Files/arrow/lib/cmake/ArrowCompute/ArrowComputeConfig.cmake ``` Ignoring case, this allows `find_package(Arrow)` to work because that matches the `<prefix>/<name>*/(lib/<arch>\|lib*\|share)/cmake/<name>*/ ` convention; however, `find_package(ArrowCompute)` fails. If you specify a INSTALL_PREFIX like C:\arrow-dist, you end up with: ``` C:/arrow-dist/lib/cmake/Arrow/ArrowConfig.cmake C:/arrow-dist/lib/cmake/ArrowCompute/ArrowComputeConfig.cmake ``` In this case, neither config file can be found by `find_package`, assumedly because CMake expects the name to appear after the <prefix> This was discovered in my fork of Arrow with the help of @raulcd ### Component(s) C++ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
