Skip to content

Commit

Permalink
Add LLVM_TOOLS_BINARY_DIR variable to LLVMConfig.cmake so clients
Browse files Browse the repository at this point in the history
of LLVM using CMake can easily find the tools directory.

LLVM_BUILD_TOOLS_BINARY_DIR was removed because it is now
superfluous.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213674 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
delcypher committed Jul 22, 2014
1 parent f969d5b commit e6113b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set(LLVM_BUILD_BINARY_DIR \"${LLVM_BINARY_DIR}\")
set(LLVM_BUILD_LIBRARY_DIR \"${LLVM_LIBRARY_DIR}\")
set(LLVM_BUILD_MAIN_INCLUDE_DIR \"${LLVM_MAIN_INCLUDE_DIR}\")
set(LLVM_BUILD_MAIN_SRC_DIR \"${LLVM_MAIN_SRC_DIR}\")
set(LLVM_BUILD_TOOLS_BINARY_DIR \"${LLVM_TOOLS_BINARY_DIR}\")
")
set(LLVM_CONFIG_INCLUDE_DIRS
"${LLVM_MAIN_INCLUDE_DIR}"
Expand All @@ -30,6 +29,7 @@ set(LLVM_CONFIG_LIBRARY_DIRS
"${LLVM_LIBRARY_DIR}"
)
set(LLVM_CONFIG_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(LLVM_CONFIG_TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
set(LLVM_CONFIG_EXPORTS_FILE "${llvm_cmake_builddir}/LLVMExports.cmake")
configure_file(
LLVMConfig.cmake.in
Expand Down Expand Up @@ -60,6 +60,7 @@ endforeach(p)
set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib")
set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
configure_file(
LLVMConfig.cmake.in
Expand Down
1 change: 1 addition & 0 deletions cmake/modules/LLVMConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ set(LLVM_INCLUDE_DIRS "@LLVM_CONFIG_INCLUDE_DIRS@")
set(LLVM_LIBRARY_DIRS "@LLVM_CONFIG_LIBRARY_DIRS@")
set(LLVM_DEFINITIONS "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS")
set(LLVM_CMAKE_DIR "@LLVM_CONFIG_CMAKE_DIR@")
set(LLVM_TOOLS_BINARY_DIR "@LLVM_CONFIG_TOOLS_BINARY_DIR@")

if(NOT TARGET LLVMSupport)
include("@LLVM_CONFIG_EXPORTS_FILE@")
Expand Down
1 change: 1 addition & 0 deletions cmake/modules/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in $(LLVMBuildCMakeFrag)
-e 's/@LLVM_CONFIG_INCLUDE_DIRS@/'"$(subst /,\/,$(PROJ_includedir))"'/' \
-e 's/@LLVM_CONFIG_LIBRARY_DIRS@/'"$(subst /,\/,$(PROJ_libdir))"'/' \
-e 's/@LLVM_CONFIG_CMAKE_DIR@/'"$(subst /,\/,$(PROJ_cmake))"'/' \
-e 's/@LLVM_CONFIG_TOOLS_BINARY_DIR@/'"$(subst /,\/,$(PROJ_bindir))"'/' \
-e 's/@LLVM_CONFIG_EXPORTS_FILE@/$${LLVM_CMAKE_DIR}\/LLVMExports.cmake/' \
-e 's/@all_llvm_lib_deps@//' \
&& \
Expand Down

0 comments on commit e6113b6

Please sign in to comment.