From 652eb506a70728d69a0858e794cd79d8840918e2 Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Sun, 8 Aug 2010 04:32:21 +0000 Subject: [PATCH] CMake: set configure macro LLVM_PREFIX git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110536 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/config-ix.cmake | 2 ++ include/llvm/Config/config.h.cmake | 2 +- include/llvm/Config/llvm-config.h.cmake | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index c03c1cb3811..3427ee9c0c0 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -260,6 +260,8 @@ else( ENABLE_THREADS ) message(STATUS "Threads disabled.") endif() +set(LLVM_PREFIX ${CMAKE_INSTALL_PREFIX}) + configure_file( ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake ${LLVM_BINARY_DIR}/include/llvm/Config/config.h diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index 5468316f9c9..d9f95a6bfaa 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -525,7 +525,7 @@ #cmakedefine LLVM_PATH_TWOPI "${LLVM_PATH_TWOPI}" /* Installation prefix directory */ -#undef LLVM_PREFIX +#cmakedefine LLVM_PREFIX "${LLVM_PREFIX}" /* Define if the OS needs help to load dependent libraries for dlopen(). */ #cmakedefine LTDL_DLOPEN_DEPLIBS ${LTDL_DLOPEN_DEPLIBS} diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake index 4b8a625b742..c277ef2b207 100644 --- a/include/llvm/Config/llvm-config.h.cmake +++ b/include/llvm/Config/llvm-config.h.cmake @@ -81,4 +81,4 @@ #cmakedefine LLVM_PATH_TWOPI "${LLVM_PATH_TWOPI}" /* Installation prefix directory */ -#cmakedefine LLVM_PREFIX +#cmakedefine LLVM_PREFIX "${LLVM_PREFIX}"