summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-06-02 11:20:04 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-06-02 11:23:10 +0300
commit8c16d6386350d8ad32d00d23e6aff6b30caa5446 (patch)
tree9624bba37a3e9d70fa4a5c070b04d6f42a6d6d01
parentd4c19949ea13fac4d54b7cc8cc22f5feb55a0c24 (diff)
cmake: find FFI fix.
- update search path according to cmake version
-rw-r--r--cmake/Modules/FindFfi.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmake/Modules/FindFfi.cmake b/cmake/Modules/FindFfi.cmake
index c59aa63..c9224d1 100644
--- a/cmake/Modules/FindFfi.cmake
+++ b/cmake/Modules/FindFfi.cmake
@@ -15,15 +15,21 @@ pkg_check_modules(PC_LIBFFI ${_QUIET} libffi)
15#set(FFI_DEFINITIONS ${PC_LIBFFI_CFLAGS_OTHER}) 15#set(FFI_DEFINITIONS ${PC_LIBFFI_CFLAGS_OTHER})
16#set(FFI_LDFLAGS_OTHER ${PC_LIBFFI_LDFLAGS_OTHER}) 16#set(FFI_LDFLAGS_OTHER ${PC_LIBFFI_LDFLAGS_OTHER})
17 17
18# before verison 2.8.11 variable CMAKE_LIBRARY_ARCHITECTURE wasn't automatically added to search path
19if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.11")
20 set(FIND_PATH_HINTS ${PC_LIBFFI_INCLUDEDIR}/${CMAKE_LIBRARY_ARCHITECTURE})
21endif ()
22
18find_path(FFI_INCLUDE_DIR ffi.h 23find_path(FFI_INCLUDE_DIR ffi.h
19 HINTS ${PC_LIBFFI_INCLUDEDIR} ${PC_LIBFFI_INCLUDE_DIRS} 24 HINTS ${PC_LIBFFI_INCLUDEDIR} ${PC_LIBFFI_INCLUDE_DIRS}
25 ${FIND_PATH_HINTS}
20 ) 26 )
21 27
22find_library(FFI_LIBRARY NAMES ffi libffi 28find_library(FFI_LIBRARY NAMES ffi libffi
23 HINTS ${PC_LIBFFI_LIBDIR} ${PC_LIBFFI_LIBRARY_DIRS} ) 29 HINTS ${PC_LIBFFI_LIBDIR} ${PC_LIBFFI_LIBRARY_DIRS})
24 30
25set(FFI_INCLUDE_DIRS ${FFI_INCLUDE_DIR}) 31set(FFI_INCLUDE_DIRS ${FFI_INCLUDE_DIR})
26set(FFI_LIBRARIES ${FFI_LIBRARY} ) 32set(FFI_LIBRARIES ${FFI_LIBRARY})
27 33
28#include(FindPackageHandleStandardArgs) 34#include(FindPackageHandleStandardArgs)
29# handle the QUIETLY and REQUIRED arguments and set EINA_FOUND to TRUE 35# handle the QUIETLY and REQUIRED arguments and set EINA_FOUND to TRUE