[llvm] r273479 - [CMake] LLVM_BINARY_DIR was not being properly set in LLVMConfig.cmake
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 14:01:19 PDT 2016
Author: cbieneman
Date: Wed Jun 22 16:01:19 2016
New Revision: 273479
URL: http://llvm.org/viewvc/llvm-project?rev=273479&view=rev
Log:
[CMake] LLVM_BINARY_DIR was not being properly set in LLVMConfig.cmake
LLVMConfig.cmake needs to set LLVM_BINARY_DIR differently based on whether or not it is the build directory or the install directory. The build directory just needs to set the value from the configuration, the install directory needs to set it to the install prefix.
Modified:
llvm/trunk/cmake/modules/CMakeLists.txt
llvm/trunk/cmake/modules/LLVMConfig.cmake.in
Modified: llvm/trunk/cmake/modules/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CMakeLists.txt?rev=273479&r1=273478&r2=273479&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CMakeLists.txt (original)
+++ llvm/trunk/cmake/modules/CMakeLists.txt Wed Jun 22 16:01:19 2016
@@ -29,6 +29,7 @@ set(LLVM_CONFIG_LIBRARY_DIRS
"${LLVM_LIBRARY_DIR}"
)
set(LLVM_CONFIG_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+set(LLVM_CONFIG_BINARY_DIR "${LLVM_BINARY_DIR}")
set(LLVM_CONFIG_TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
set(LLVM_CONFIG_EXPORTS_FILE "${llvm_cmake_builddir}/LLVMExports.cmake")
configure_file(
@@ -60,6 +61,7 @@ endforeach(p)
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}")
+set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
configure_file(
Modified: llvm/trunk/cmake/modules/LLVMConfig.cmake.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake.in?rev=273479&r1=273478&r2=273479&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMConfig.cmake.in (original)
+++ llvm/trunk/cmake/modules/LLVMConfig.cmake.in Wed Jun 22 16:01:19 2016
@@ -53,7 +53,7 @@ set(LLVM_LIBRARY_DIRS "@LLVM_CONFIG_LIBR
set(LLVM_LIBRARY_DIR "@LLVM_CONFIG_LIBRARY_DIRS@")
set(LLVM_DEFINITIONS "@LLVM_DEFINITIONS@")
set(LLVM_CMAKE_DIR "@LLVM_CONFIG_CMAKE_DIR@")
-set(LLVM_BINARY_DIR "${LLVM_INSTALL_PREFIX}")
+set(LLVM_BINARY_DIR "@LLVM_CONFIG_BINARY_DIR@")
set(LLVM_TOOLS_BINARY_DIR "@LLVM_CONFIG_TOOLS_BINARY_DIR@")
set(LLVM_TOOLS_INSTALL_DIR "@LLVM_TOOLS_INSTALL_DIR@")
More information about the llvm-commits
mailing list