Skip to content

Relative path for CMAKE_INSTALL_LIBDIR broken #952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
olesenm opened this issue Apr 3, 2025 · 0 comments
Open

Relative path for CMAKE_INSTALL_LIBDIR broken #952

olesenm opened this issue Apr 3, 2025 · 0 comments

Comments

@olesenm
Copy link

olesenm commented Apr 3, 2025

As a workaround or fix for issue #951, now specified -DCMAKE_INSTALL_LIBDIR=lib.
Surprisingly this failed. It only seems to work with an absolute path, contrary to what the cmake docs suggest.

With a relative path, both the fmt and umpire files are installed in the build directory.
To diagnose which files are actually being installed in the wrong directory versus files left behind from the build process itself, I specified -DCMAKE_INSTALL_LIBDIR=mylib instead. These ones are being installed under the build directory:

<build-dir>/mylib/libfmt.a
<build-dir>/mylib/libumpire.a

<build-dir>/mylib/pkgconfig/fmt.pc

<build-dir>/mylib/cmake/fmt/*.cmake
<build-dir>/mylib/cmake/umpire/*.cmake

The real installation gets these:

<prefix-dir>/lib/libcamp.a
<prefix-dir>/lib/cmake/camp/*.cmake

The BLTInstallableMacros.cmake, BLTSetupTargets.cmake, BLTThirdPartyConfigFlags.cmake files are installed both under the cmake/camp as well as the cmake/umpire directories. I just mention that in case it is incorrect or otherwise useful to know.

So the current workaround is obviously to specify libdir as an absolute path and pretend that it is CMAKE_INSTALL_FULL_LIBDIR for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant