aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-01-21 15:42:54 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-01-21 15:42:54 +0000
commit596937914548c181f2504aad3b709189e87a561b (patch)
tree6801a4e7f8ae8442350c025c6523fa6f60a091e8 /lib/ExecutionEngine/Interpreter
parent030160073d8ec7d5fc1d928d9c8b6173d3a5e0cc (diff)
Handles libffi on the CMake build.
Patch by arrowdodger! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter')
-rw-r--r--lib/ExecutionEngine/Interpreter/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/lib/ExecutionEngine/Interpreter/CMakeLists.txt
index dff97fa26e..39df555d5e 100644
--- a/lib/ExecutionEngine/Interpreter/CMakeLists.txt
+++ b/lib/ExecutionEngine/Interpreter/CMakeLists.txt
@@ -1,5 +1,21 @@
+# If the user required a custom path for ffi headers, use it on its
+# abolute form (see config-ix.cmake):
+if( FFI_INCLUDE_DIR )
+ include_directories( ${FFI_INCLUDE_PATH} )
+endif()
+
+# If the user required a custom path for libffi, use it on its abolute
+# form (see config-ix.cmake):
+if( FFI_LIBRARY_DIR )
+ link_directories( ${FFI_LIBRARY_PATH} )
+endif()
+
add_llvm_library(LLVMInterpreter
Execution.cpp
ExternalFunctions.cpp
Interpreter.cpp
)
+
+if( LLVM_ENABLE_FFI )
+ target_link_libraries( LLVMInterpreter ffi )
+endif()