summaryrefslogtreecommitdiff
path: root/debian/patches/fix-cmake-config-prefix.diff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:41:01 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:41:01 +0300
commit7a2b43796a4c38cf98fe05e8e4ec985318b2721b (patch)
treeb0f5611276e10646b654f7d5ed12c6e6060353be /debian/patches/fix-cmake-config-prefix.diff
downloadllvm-toolchain-5.0-7a2b43796a4c38cf98fe05e8e4ec985318b2721b.tar.gz
Imported llvm-toolchain-5.0 (1:5.0-4)debian/5.0-4debian
Diffstat (limited to 'debian/patches/fix-cmake-config-prefix.diff')
-rw-r--r--debian/patches/fix-cmake-config-prefix.diff27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/patches/fix-cmake-config-prefix.diff b/debian/patches/fix-cmake-config-prefix.diff
new file mode 100644
index 0000000..2587d10
--- /dev/null
+++ b/debian/patches/fix-cmake-config-prefix.diff
@@ -0,0 +1,27 @@
+## Description: add some description
+## Origin/Author: add some origin or author
+## Bug: bug URL
+---
+# cmake/modules/CMakeLists.txt | 11 +----------
+# 1 file changed, 1 insertion(+), 10 deletions(-)
+#
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -74,16 +74,7 @@ file(COPY .
+ )
+
+ # Generate LLVMConfig.cmake for the install tree.
+-set(LLVM_CONFIG_CODE "
+-# Compute the installation prefix from this LLVMConfig.cmake file location.
+-get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
+-# Construct the proper number of get_filename_component(... PATH)
+-# calls to compute the installation prefix.
+-string(REGEX REPLACE "/" ";" _count "${LLVM_INSTALL_PACKAGE_DIR}")
+-foreach(p ${_count})
+- set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
+-get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
+-endforeach(p)
++set(LLVM_CONFIG_CODE "set(LLVM_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")")
+ set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
+ set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")