blob: c8e4b6eedcd79ca71d9276e59967c99f6b3bbaf3 [file] [log] [blame]
Oscar Fuentes800a2af2011-01-27 22:58:34 +00001# Make sure that the path to libffi headers is on the command
2# line. That path can be a compiler's non-default path even when
3# FFI_INCLUDE_DIR was not used, because cmake has its own paths for
4# searching for headers (CMAKE_SYSTEM_INCLUDE_PATH, for instance):
5if( FFI_INCLUDE_PATH )
Oscar Fuentes64955952011-01-21 15:42:54 +00006 include_directories( ${FFI_INCLUDE_PATH} )
7endif()
8
Oscar Fuentes800a2af2011-01-27 22:58:34 +00009# Make sure that the path to libffi archive is on the command
10# line. That path can be a linker's non-default path even when
11# FFI_LIBRARY_DIR was not used, because cmake has its own paths for
12# searching for libraries (CMAKE_SYSTEM_LIBRARY_PATH, for instance):
13if( FFI_LIBRARY_PATH )
Oscar Fuentes64955952011-01-21 15:42:54 +000014 link_directories( ${FFI_LIBRARY_PATH} )
15endif()
16
Douglas Gregor85fedbe2009-06-23 17:57:35 +000017add_llvm_library(LLVMInterpreter
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000018 Execution.cpp
19 ExternalFunctions.cpp
20 Interpreter.cpp
21 )
Oscar Fuentes64955952011-01-21 15:42:54 +000022
23if( LLVM_ENABLE_FFI )
24 target_link_libraries( LLVMInterpreter ffi )
25endif()