summaryrefslogtreecommitdiff
path: root/cmake/modules/LLVMConfig.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/LLVMConfig.cmake.in')
-rw-r--r--cmake/modules/LLVMConfig.cmake.in16
1 files changed, 3 insertions, 13 deletions
diff --git a/cmake/modules/LLVMConfig.cmake.in b/cmake/modules/LLVMConfig.cmake.in
index 5e38d82f59..224a26352d 100644
--- a/cmake/modules/LLVMConfig.cmake.in
+++ b/cmake/modules/LLVMConfig.cmake.in
@@ -41,16 +41,6 @@ set(LLVM_INCLUDE_DIRS ${LLVM_INSTALL_PREFIX}/include)
set(LLVM_LIBRARY_DIRS ${LLVM_INSTALL_PREFIX}/lib)
set(LLVM_DEFINITIONS "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS")
-# We try to include using the current setting of CMAKE_MODULE_PATH,
-# which suppossedly was filled by the user with the directory where
-# this file was installed:
-include( LLVM-Config OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED )
-
-# If failed, we assume that this is an un-installed build:
-if( NOT LLVMCONFIG_INCLUDED )
- set(CMAKE_MODULE_PATH
- ${CMAKE_MODULE_PATH}
- "@LLVM_SOURCE_DIR@/cmake/modules")
- include( LLVM-Config )
-endif()
-
+get_filename_component(_SELF_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+include(${_SELF_DIR}/LLVM-Config.cmake)
+unset(_SELF_DIR)