You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2015/07/09 17:12:19 UTC
celix git commit: CELIX-237: small change in travis.yml and update in
FindFFI.cmake for find macports installed ffi
Repository: celix
Updated Branches:
refs/heads/feature/CELIX-237_rsa-ffi dcbdd97dd -> 799c484c4
CELIX-237: small change in travis.yml and update in FindFFI.cmake for find macports installed ffi
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/799c484c
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/799c484c
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/799c484c
Branch: refs/heads/feature/CELIX-237_rsa-ffi
Commit: 799c484c4e0d3ff7e5e992588175d57cebeafe4f
Parents: dcbdd97
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jul 9 17:17:57 2015 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jul 9 17:17:57 2015 +0200
----------------------------------------------------------------------
.travis.yml | 3 ++-
cmake/FindFFI.cmake | 19 +++++++++++++++----
2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/799c484c/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 02573ef..58d767d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,4 +25,5 @@ before_script:
- cmake -DCMAKE_SKIP_BUILD_RPATH=TRUE -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_EXAMPLES=ON -DBUILD_LOG_SERVICE=ON -DBUILD_LOG_WRITER=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON -DBUILD_RSA_DISCOVERY_CONFIGURED=ON -DBUILD_RSA_DISCOVERY_ETCD=ON -DBUILD_RSA_DISCOVERY_SHM=ON -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP=ON -DBUILD_REMOTE_SHELL=ON -DBUILD_SHELL=ON -DBUILD_SHELL_TUI=ON -DCMAKE_INSTALL_PREFIX=../install ..
script:
- - make all && make test ARGS="-V"
+ - make all
+ - make test ARGS="-V"
http://git-wip-us.apache.org/repos/asf/celix/blob/799c484c/cmake/FindFFI.cmake
----------------------------------------------------------------------
diff --git a/cmake/FindFFI.cmake b/cmake/FindFFI.cmake
index cc6c8c8..1dcf0c6 100644
--- a/cmake/FindFFI.cmake
+++ b/cmake/FindFFI.cmake
@@ -23,14 +23,25 @@
# FFI_INCLUDE_DIRS - The package include directories
# FFI_LIBRARIES - The libraries needed to use this package
+find_library(FFI_LIBRARY NAMES ffi
+ PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr/local /opt/local ENV FFI_DIR
+ PATH_SUFFIXES lib lib/x86_64-linux-gnu NO_DEFAULT_PATH)
+
+find_library(FFI_LIBRARY NAMES ffi
+ PATH_SUFFIXES lib)
+
+#NOTE on OSX ffi.h from macport is located at /opt/local/lib/libffi-<version>/ffi.h
+#Using FFI_LIBRARY location as hint to find it
+get_filename_component(FFI_LIB_DIR ${FFI_LIBRARY} DIRECTORY)
+find_path(FFI_INCLUDE_DIR ffi.h
+ HINTS ${FFI_LIB_DIR}/*
+ PATH_SUFFIXES include include/ffi)
+unset(FFI_LIB_DIR)
+
find_path(FFI_INCLUDE_DIR ffi.h
PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
PATH_SUFFIXES include include/ffi include/x86_64-linux-gnu)
-find_library(FFI_LIBRARY NAMES ffi
- PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
- PATH_SUFFIXES lib lib64 lib/x86_64-linux-gnu)
-
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set FFI_FOUND to TRUE