celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erjanalt...@apache.org
Subject celix git commit: Added etcdlib's include dir to CELIX_INCLUDE_DIRS
Date Sat, 22 Jul 2017 10:27:43 GMT
Repository: celix
Updated Branches:
  refs/heads/develop d1f0e1d33 -> a09848351


Added etcdlib's include dir to CELIX_INCLUDE_DIRS


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/a0984835
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/a0984835
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/a0984835

Branch: refs/heads/develop
Commit: a098483519013914279823aa9ff3c5c2e5267b7e
Parents: d1f0e1d
Author: Erjan Altena <erjanaltena@gmail.com>
Authored: Sat Jul 22 12:24:38 2017 +0200
Committer: Erjan Altena <erjanaltena@gmail.com>
Committed: Sat Jul 22 12:24:38 2017 +0200

----------------------------------------------------------------------
 cmake/FindCELIX.cmake         | 19 +++++++++++++++----
 etcdlib/public/include/etcd.h |  7 +++++++
 2 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/a0984835/cmake/FindCELIX.cmake
----------------------------------------------------------------------
diff --git a/cmake/FindCELIX.cmake b/cmake/FindCELIX.cmake
index 84642d2..9d76996 100644
--- a/cmake/FindCELIX.cmake
+++ b/cmake/FindCELIX.cmake
@@ -33,11 +33,16 @@
 set(CELIX_DIR_FROM_FINDCELIX "${CMAKE_CURRENT_LIST_DIR}/../../../..")
 
 
-find_path(CELIX_INCLUDE_DIR celix_errno.h
+find_path(CELIX_INCLUDE_DIR NAMES celix_errno.h
 		PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
           	PATH_SUFFIXES include include/celix
 )
 
+find_path(CELIX_ETCD_INCLUDE_DIR NAMES etcd.h
+		PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
+		PATH_SUFFIXES include include/etcdlib
+		)
+
 find_library(CELIX_FRAMEWORK_LIBRARY NAMES celix_framework
              	PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
              	PATH_SUFFIXES lib lib64
@@ -58,7 +63,7 @@ find_program(CELIX_LAUNCHER NAMES celix
 		PATH_SUFFIXES bin
 )
 
-find_file(CELIX_CMAKECELIX_FILE CMakeCelix.cmake
+find_file(CELIX_CMAKECELIX_FILE NAMES CMakeCelix.cmake
              	PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
              	PATH_SUFFIXES share/celix/cmake/modules
 )
@@ -84,6 +89,11 @@ find_library(CELIX_DM_STATIC_CXX_LIB NAMES dependency_manager_cxx_static
 		PATH_SUFFIXES lib lib64
 )
 
+find_library(CELIX_ETCD_LIB NAMES etcdlib
+		PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
+		PATH_SUFFIXES lib lib64
+		)
+
 if (CELIX_DM_STATIC_LIB)
     set(CELIX_DM_INCLUDE_DIR ${CELIX_INCLUDE_DIR}/dependency_manager)
 endif()
@@ -99,10 +109,11 @@ include(FindPackageHandleStandardArgs)
 # if all listed variables are TRUE
 find_package_handle_standard_args(CELIX  DEFAULT_MSG
 	CELIX_FRAMEWORK_LIBRARY CELIX_UTILS_LIBRARY CELIX_DFI_LIBRARY CELIX_DM_LIB CELIX_DM_STATIC_LIB
CELIX_DM_STATIC_CXX_LIB CELIX_INCLUDE_DIR CELIX_LAUNCHER CELIX_CMAKECELIX_FILE)
-mark_as_advanced(CELIX_INCLUDE_DIR CELIX_FRAMEWORK_LIBRARY CELIX_UTILS_LIBRARY CELIX_LAUNCHER
CELIX_CMAKECELIX_FILE)
+mark_as_advanced(CELIX_INCLUDE_DIR CELIX_ETCD_INCLUDE_DIR CELIX_FRAMEWORK_LIBRARY CELIX_UTILS_LIBRARY
CELIX_LAUNCHER CELIX_CMAKECELIX_FILE)
 
 if(CELIX_FOUND)
 	set(CELIX_LIBRARIES ${CELIX_FRAMEWORK_LIBRARY} ${CELIX_UTILS_LIBRARY} ${CELIX_DFI_LIBRARY})
-	set(CELIX_INCLUDE_DIRS ${CELIX_INCLUDE_DIR} ${CELIX_DM_INCLUDE_DIR} ${CELIX_DM_CXX_INCLUDE_DIR})
+	set(CELIX_INCLUDE_DIRS ${CELIX_INCLUDE_DIR} ${CELIX_ETCD_INCLUDE_DIR} ${CELIX_DM_INCLUDE_DIR}
${CELIX_DM_CXX_INCLUDE_DIR})
 	include(${CELIX_CMAKECELIX_FILE})
+	include_directories(${CELIX_INCLUDE_DIRS})
 endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a0984835/etcdlib/public/include/etcd.h
----------------------------------------------------------------------
diff --git a/etcdlib/public/include/etcd.h b/etcdlib/public/include/etcd.h
index 0fdb99a..7980700 100644
--- a/etcdlib/public/include/etcd.h
+++ b/etcdlib/public/include/etcd.h
@@ -30,6 +30,13 @@
  */
 #define ETCDLIB_NO_CURL_INITIALIZATION (1)
 
+#define ETCDLIB_ACTION_CREATE   "create"
+#define ETCDLIB_ACTION_GET      "get"
+#define ETCDLIB_ACTION_SET      "set"
+#define ETCDLIB_ACTION_UPDATE   "update"
+#define ETCDLIB_ACTION_DELETE   "delete"
+#define ETCDLIB_ACTION_EXPIRE   "expire"
+
 typedef void (*etcd_key_value_callback) (const char *key, const char *value, void* arg);
 
 /**


Mime
View raw message