[PATCH] D118959: [libclc][cmake] Support custom GNU install dirs
Ryan Burns via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 3 18:09:08 PST 2022
r-burns created this revision.
Herald added a subscriber: jvesely.
r-burns requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Custom GNU install dirs specified at configure time may be absolute paths, in which case appending to the install prefix is not correct. Instead we can use the already available CMAKE_INSTALL_FULL_* variables, which are correctly precomputed absolute paths.
This is helpful in Nixpkgs, where we specify an absolute CMAKE_INSTALL_INCLUDEDIR by default. Also, this may resolve the issue that prompted https://reviews.llvm.org/D111111
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118959
Files:
libclc/libclc.pc.in
Index: libclc/libclc.pc.in
===================================================================
--- libclc/libclc.pc.in
+++ libclc/libclc.pc.in
@@ -1,5 +1,5 @@
-includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
-libexecdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/clc
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+libexecdir=@CMAKE_INSTALL_FULL_DATADIR@/clc
Name: libclc
Description: Library requirements of the OpenCL C programming language
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118959.405843.patch
Type: text/x-patch
Size: 461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220204/632d2305/attachment.bin>
More information about the llvm-commits
mailing list