[llvm] r175167 - On FreeBSD, we need to look in /usr/local/include so that libxml2 finds iconv.h

David Chisnall csdavec at swan.ac.uk
Thu Feb 14 07:40:44 PST 2013


Author: theraven
Date: Thu Feb 14 09:40:44 2013
New Revision: 175167

URL: http://llvm.org/viewvc/llvm-project?rev=175167&view=rev
Log:
On FreeBSD, we need to look in /usr/local/include so that libxml2 finds iconv.h

Patch by Jonathan Anderson!


Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=175167&r1=175166&r2=175167&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Feb 14 09:40:44 2013
@@ -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 )





More information about the llvm-commits mailing list