Oscar Fuentes | 800a2af | 2011-01-27 22:58:34 +0000 | [diff] [blame] | 1 | # 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): |
| 5 | if( FFI_INCLUDE_PATH ) |
Oscar Fuentes | 6495595 | 2011-01-21 15:42:54 +0000 | [diff] [blame] | 6 | include_directories( ${FFI_INCLUDE_PATH} ) |
| 7 | endif() |
| 8 | |
Oscar Fuentes | 800a2af | 2011-01-27 22:58:34 +0000 | [diff] [blame] | 9 | # 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): |
| 13 | if( FFI_LIBRARY_PATH ) |
Oscar Fuentes | 6495595 | 2011-01-21 15:42:54 +0000 | [diff] [blame] | 14 | link_directories( ${FFI_LIBRARY_PATH} ) |
| 15 | endif() |
| 16 | |
Douglas Gregor | 85fedbe | 2009-06-23 17:57:35 +0000 | [diff] [blame] | 17 | add_llvm_library(LLVMInterpreter |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 18 | Execution.cpp |
| 19 | ExternalFunctions.cpp |
| 20 | Interpreter.cpp |
| 21 | ) |
Oscar Fuentes | 6495595 | 2011-01-21 15:42:54 +0000 | [diff] [blame] | 22 | |
| 23 | if( LLVM_ENABLE_FFI ) |
| 24 | target_link_libraries( LLVMInterpreter ffi ) |
| 25 | endif() |