|
|
|
From 21b9ac9a713657e794c6b1f57e8e94fd9ac970cb Mon Sep 17 00:00:00 2001
|
|
|
|
From: Tom Stellard <tstellar@redhat.com>
|
|
|
|
Date: Mon, 2 Oct 2017 18:42:32 -0700
|
|
|
|
Subject: [PATCH] Fix CMake include patch
|
|
|
|
|
|
|
|
---
|
|
|
|
CMakeLists.txt | 10 ++++++++--
|
|
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 63122c4..6ddc261 100644
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -295,6 +295,7 @@ else()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Each of them corresponds to llvm-config's.
|
|
|
|
+#
|
|
|
|
set(LLVM_TOOLS_BINARY_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) # --bindir
|
|
|
|
set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) # --libdir
|
|
|
|
set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) # --src-root
|
|
|
|
@@ -789,6 +790,11 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
|
|
|
|
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
|
|
|
|
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
|
|
|
|
|
|
|
|
+if(INCLUDE_INSTALL_DIR)
|
|
|
|
+else()
|
|
|
|
+set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include)
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
if(APPLE AND DARWIN_LTO_LIBRARY)
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS
|
|
|
|
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
|
|
|
|
@@ -966,7 +972,7 @@ endif()
|
|
|
|
|
|
|
|
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
|
|
install(DIRECTORY include/llvm include/llvm-c
|
|
|
|
- DESTINATION include
|
|
|
|
+ DESTINATION "${INCLUDE_INSTALL_DIR}"
|
|
|
|
COMPONENT llvm-headers
|
|
|
|
FILES_MATCHING
|
|
|
|
PATTERN "*.def"
|
|
|
|
@@ -978,7 +984,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
|
|
)
|
|
|
|
|
|
|
|
install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
|
|
|
|
- DESTINATION include
|
|
|
|
+ DESTINATION "${INCLUDE_INSTALL_DIR}"
|
|
|
|
COMPONENT llvm-headers
|
|
|
|
FILES_MATCHING
|
|
|
|
PATTERN "*.def"
|
|
|
|
--
|
|
|
|
1.8.3.1
|
|
|
|
|