celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [1/2] celix git commit: CELIX-385: Improvements for building stand-alone etcdlib
Date Thu, 26 Jan 2017 18:12:58 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 2366cd86a -> 4e665476c


CELIX-385: Improvements for building stand-alone etcdlib


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

Branch: refs/heads/develop
Commit: e9528c692f13f799c7d351b4a5b86c5628a11ee1
Parents: 2366cd8
Author: Roy Lenferink <lenferinkroy@gmail.com>
Authored: Wed Jan 25 11:40:31 2017 +0100
Committer: Roy Lenferink <lenferinkroy@gmail.com>
Committed: Wed Jan 25 11:40:31 2017 +0100

----------------------------------------------------------------------
 etcdlib/CMakeLists.txt          |  5 +++++
 etcdlib/cmake/FindJansson.cmake | 42 ++++++++++++++++++++++++++++++++++++
 etcdlib/public/include/etcd.h   |  2 +-
 3 files changed, 48 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/e9528c69/etcdlib/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/etcdlib/CMakeLists.txt b/etcdlib/CMakeLists.txt
index 5c078f1..fd72d79 100644
--- a/etcdlib/CMakeLists.txt
+++ b/etcdlib/CMakeLists.txt
@@ -28,6 +28,11 @@ if (NOT PROJECT_SOURCE_DIR)
     )
 
     include(GNUInstallDirs)
+
+    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
+    set(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 ${CMAKE_C_FLAGS}")
+    set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG")
+
     set(ETCDLIB_CMP ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME})
 else()
     set(ETCDLIB_CMP framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/e9528c69/etcdlib/cmake/FindJansson.cmake
----------------------------------------------------------------------
diff --git a/etcdlib/cmake/FindJansson.cmake b/etcdlib/cmake/FindJansson.cmake
new file mode 100644
index 0000000..bedf8be
--- /dev/null
+++ b/etcdlib/cmake/FindJansson.cmake
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+# - Try to find Jansson
+# Once done this will define
+#  JANSSON_FOUND - System has Jansson
+#  JANSSON_INCLUDE_DIRS - The Jansson include directories
+#  JANSSON_LIBRARIES - The libraries needed to use Jansson
+#  JANSSON_DEFINITIONS - Compiler switches required for using Jansson
+
+find_path(JANSSON_INCLUDE_DIR jansson.h
+          /usr/include
+          /usr/local/include )
+
+find_library(JANSSON_LIBRARY NAMES jansson
+             PATHS /usr/lib /usr/local/lib )
+
+set(JANSSON_LIBRARIES ${JANSSON_LIBRARY} )
+set(JANSSON_INCLUDE_DIRS ${JANSSON_INCLUDE_DIR} )
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set JANSSON_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(Jansson  DEFAULT_MSG
+                                  JANSSON_LIBRARY JANSSON_INCLUDE_DIR)
+
+mark_as_advanced(JANSSON_INCLUDE_DIR JANSSON_LIBRARY )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/e9528c69/etcdlib/public/include/etcd.h
----------------------------------------------------------------------
diff --git a/etcdlib/public/include/etcd.h b/etcdlib/public/include/etcd.h
index ba05ff7..0fdb99a 100644
--- a/etcdlib/public/include/etcd.h
+++ b/etcdlib/public/include/etcd.h
@@ -25,7 +25,7 @@
 /*
  * If set etcdlib will _not_ initialize curl
  * using curl_global_init. Note that 
- * curl_global_init can be called mutiple 
+ * curl_global_init can be called multiple
  * times, but is _not_ thread-safe.
  */
 #define ETCDLIB_NO_CURL_INITIALIZATION (1)


Mime
View raw message