eli-schwartz commented on issue #36411:
URL: https://github.com/apache/arrow/issues/36411#issuecomment-2738362494
> you didn't mean to include cmake itself in that list? You mean for other
tools like Meson or Bazel?
:eyes: you saw nothing
> Typically you will also want to specify whether the target is a
shared/static library
I guess that could be done with find_library + hints too, right?
> The main trick is ensuring that the file is relocatable, so ideally at the
top you'll have paths set based on the `CMAKE_CURRENT_LIST_DIR` or a template
variable that's filled in by a CMake `configure_file` call.
Yup, same way that meson sets a template variable `prefix=/usr` or for
relocatable files, `prefix=${pcfiledir}/../../`.
IIRC `${CMAKE_CURRENT_LIST_DIR}` is, like `${pcfiledir}`, defined as "the
directory in which the currently processing file is located". The only slightly
complicated part there is building `../../` correctly (you want meson's
[`fs.relative_to()`](https://mesonbuild.com/Fs-module.html#relative_to) or
cmake's [`cmake_path(RELATIVE_PATH
)`](https://cmake.org/cmake/help/latest/command/cmake_path.html#relative-path)
to compute the path back from the file's install directory to the relocatable
install prefix).
--
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]