ktaka...@gmail.com wrote:
>> Actually, I have libffi 3.0.10 already installed.
> Seems CMake couldn't find ffi.h on your environment. If you are sure your compiler can find the file, please try following steps;
I have the same issue here. ffi.h is installed into
/usr/lib/libffi-3.0.11/include/ffi.h
(Gentoo Linux i686 stable)
> 1. add following line to ${expanded dir}/ext/ffi/CMakeLists.txt
> CHECK_INCLUDE_FILE(ffi.h HAVE_FFI_H) # below this line
> + SET(HAVE_FFI_H TRUE)
That won't work, because the path are non-standards. However, my libffi
provide a pkg-config file that should be used.
I added and changed a bit the following code to
sagittarius/ext/ffi/CMakeFiles.txt:
INCLUDE(FindPkgConfig)
pkg_check_modules(LIBFFI REQUIRED libffi)
CHECK_INCLUDE_FILE(ffi.h HAVE_FFI_H ${LIBFFI_CFLAGS})
Then cmake find my system libffi :)
However; I'm not a cmake expert, so I don't know if pkg_check_modules is
the way to do (there exist pkg_search_module). Hope you have a clue.
Cheers,
--
Cyprien/Fulax