|
|
74e884 |
From f8dac15efe0c2330e1d24bcac89b1d01d9c794b9 Mon Sep 17 00:00:00 2001
|
|
|
74e884 |
From: Tom Stellard <tstellar@redhat.com>
|
|
|
74e884 |
Date: Mon, 2 Oct 2017 18:42:32 -0700
|
|
|
74e884 |
Subject: [PATCH] Fix CMake include patch
|
|
|
74e884 |
|
|
|
74e884 |
---
|
|
|
74e884 |
CMakeLists.txt | 10 ++++++++--
|
|
|
74e884 |
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
74e884 |
|
|
|
74e884 |
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
74e884 |
index 160f3b0..2fd3a27 100644
|
|
|
74e884 |
--- a/CMakeLists.txt
|
|
|
74e884 |
+++ b/CMakeLists.txt
|
|
|
74e884 |
@@ -303,6 +303,7 @@ else()
|
|
|
198b24 |
endif()
|
|
|
198b24 |
|
|
|
198b24 |
# Each of them corresponds to llvm-config's.
|
|
|
198b24 |
+#
|
|
|
198b24 |
set(LLVM_TOOLS_BINARY_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) # --bindir
|
|
|
198b24 |
set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) # --libdir
|
|
|
198b24 |
set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) # --src-root
|
|
|
74e884 |
@@ -768,6 +769,11 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
|
|
|
198b24 |
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
|
|
|
198b24 |
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
|
|
|
198b24 |
|
|
|
198b24 |
+if(INCLUDE_INSTALL_DIR)
|
|
|
198b24 |
+else()
|
|
|
198b24 |
+set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include)
|
|
|
198b24 |
+endif()
|
|
|
198b24 |
+
|
|
|
74e884 |
if(APPLE AND DARWIN_LTO_LIBRARY)
|
|
|
74e884 |
set(CMAKE_EXE_LINKER_FLAGS
|
|
|
74e884 |
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
|
|
|
74e884 |
@@ -949,7 +955,7 @@ add_subdirectory(cmake/modules)
|
|
|
198b24 |
|
|
|
198b24 |
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
|
198b24 |
install(DIRECTORY include/llvm include/llvm-c
|
|
|
198b24 |
- DESTINATION include
|
|
|
198b24 |
+ DESTINATION "${INCLUDE_INSTALL_DIR}"
|
|
|
198b24 |
COMPONENT llvm-headers
|
|
|
198b24 |
FILES_MATCHING
|
|
|
198b24 |
PATTERN "*.def"
|
|
|
74e884 |
@@ -961,7 +967,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
|
198b24 |
)
|
|
|
198b24 |
|
|
|
198b24 |
install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm
|
|
|
198b24 |
- DESTINATION include
|
|
|
198b24 |
+ DESTINATION "${INCLUDE_INSTALL_DIR}"
|
|
|
198b24 |
COMPONENT llvm-headers
|
|
|
198b24 |
FILES_MATCHING
|
|
|
198b24 |
PATTERN "*.def"
|
|
|
74e884 |
--
|
|
|
74e884 |
1.8.3.1
|
|
|
74e884 |
|