diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2013-02-14 15:40:44 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2013-02-14 15:40:44 +0000 |
commit | 579ad50f511d663f3d2797af2ad8c7218ee89606 (patch) | |
tree | 7e2859e0c71de194bbe5e4b52d97e6fba3292c5e /CMakeLists.txt | |
parent | b1d081230e40e5c86f3cc44a7cfd7241732eabfb (diff) |
On FreeBSD, we need to look in /usr/local/include so that libxml2 finds iconv.h
Patch by Jonathan Anderson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ed2c405f5d..71a74260ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -376,6 +376,13 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR}) +if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) + # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM + # with libxml2, iconv.h, etc., we must add /usr/local paths. + include_directories("/usr/local/include") + link_directories("/usr/local/lib") +endif( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) + if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h") endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) |