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 2019/09/06 17:47:02 UTC

[celix] branch develop updated: Develop (#46)

This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/develop by this push:
     new a140810  Develop (#46)
a140810 is described below

commit a14081069e4a0dc1abe053c8768de7bac208bac3
Author: idzardh <id...@live.nl>
AuthorDate: Fri Sep 6 19:46:58 2019 +0200

    Develop (#46)
    
    * Added avpr parsing and serialization
    
    * Reset to Celix
    
    * Fix naming error
    
    * Re-enable test 3
    
    * Update cpp test code
    
    * Update json serializer to also handle avpr
    
    Leave descriptor parsing intact
    
    * Adding all annotations to dyn_type
    
    * Added test case for custom annotation
    
    * Reset CMakeLists.txt
    
    * Fix typo
    
    * Try fix
    
    * Reindent
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Add openssl findpackage
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Added cmake file for openssl if not present
    
    * Enable more comprehensive warnings for higher compiler versions
    
    * Set root dir
    
    * Add include to cmake file
    
    * Remove unwanted
    
    * Remove IMPORTED keyword
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update .travis.yml
    
    * Fix for openssl
    
    * Fix missing include
    
    * Update CMakeLists.txt
    
    * Better script for extra flags icm with debug flag
    
    * Update CMakeLists.txt
    
    * Delete AddOpenSSL.cmake
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Create FindOpenSSL.cmake
    
    * Update .travis.yml
    
    * Update .travis.yml
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update CMakeLists.txt
    
    * Update .travis.yml
    
    * Update FindOpenSSL.cmake
    
    * Suggested fixes for OSX
---
 .travis.yml                     |  2 +-
 cmake/Modules/FindOpenSSL.cmake | 44 +++++++++++++++++++++++++++++++++++++++++
 libs/etcdlib/CMakeLists.txt     |  5 +++--
 3 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 1d1cd30..cfbb67e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@ matrix:
 
 before_install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ] &&  [ -z "$ANDROID" ]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev gcc-4.8 g++-4.8; fi
-  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi zeromq czmq openssl && brew link --force libffi; fi
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi zeromq czmq openssl && brew link --force libffi && brew unlink openssl && brew link openssl --force; fi
 
 before_script:
     - wget https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz -O /tmp/cpputest.tar.gz
diff --git a/cmake/Modules/FindOpenSSL.cmake b/cmake/Modules/FindOpenSSL.cmake
new file mode 100644
index 0000000..6787123
--- /dev/null
+++ b/cmake/Modules/FindOpenSSL.cmake
@@ -0,0 +1,44 @@
+# 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 OpenSSL
+# Once done this will define
+#  OPENSSL_FOUND - System has OpenSSL
+#  OPENSSL_INCLUDE_DIRS - The OpenSSL include directories
+#  OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
+#  OPENSSL_DEFINITIONS - Compiler switches required for using OpenSSL
+
+find_path(OPENSSL_INCLUDE_DIR ssl.h crypto.h
+          /usr/include/openssl
+          /usr/local/include/openssl 
+          /usr/local/opt/openssl/include/openssl
+          ${OPENSSL_DIR}/include/openssl)
+
+find_library(OPENSSL_LIBRARY NAMES ssl
+             PATHS /usr/lib /usr/local/lib  /usr/local/opt/openssl/lib ${OPENSSL_DIR}/lib)
+
+set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARY} )
+set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR} )
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set OPENSSL_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(OpenSSL  DEFAULT_MSG
+                                  OPENSSL_LIBRARY OPENSSL_INCLUDE_DIR)
+
+mark_as_advanced(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARY)
diff --git a/libs/etcdlib/CMakeLists.txt b/libs/etcdlib/CMakeLists.txt
index 9a9962f..9fff290 100644
--- a/libs/etcdlib/CMakeLists.txt
+++ b/libs/etcdlib/CMakeLists.txt
@@ -40,6 +40,7 @@ endif ()
 
 find_package(CURL REQUIRED)
 find_package(Jansson REQUIRED)
+find_package(OpenSSL REQUIRED)
 
 add_library(etcdlib SHARED
     src/etcd.c
@@ -56,7 +57,7 @@ target_include_directories(etcdlib SYSTEM PRIVATE
 
 set_target_properties(etcdlib PROPERTIES SOVERSION 1)
 set_target_properties(etcdlib PROPERTIES VERSION 1.0.0)
-target_link_libraries(etcdlib PRIVATE ${CURL_LIBRARY} ${JANSSON_LIBRARIES})
+target_link_libraries(etcdlib PRIVATE ${CURL_LIBRARY} ${JANSSON_LIBRARIES} ${OPENSSL_LIBRARY})
 
 add_library(etcdlib_static STATIC
     src/etcd.c
@@ -74,7 +75,7 @@ set_target_properties(etcdlib_static PROPERTIES "SOVERSION" 1)
 target_link_libraries(etcdlib_static PRIVATE ${CURL_LIBRARY} ${JANSSON_LIBRARY})
 
 add_executable(etcdlib_test ${CMAKE_CURRENT_SOURCE_DIR}/test/etcdlib_test.c)
-target_link_libraries(etcdlib_test PRIVATE etcdlib_static ${CURL_LIBRARY} ${JANSSON_LIBRARY})
+target_link_libraries(etcdlib_test PRIVATE etcdlib_static ${CURL_LIBRARY} ${JANSSON_LIBRARY} ${OPENSSL_LIBRARY})
 
 #TODO install etcdlib_static. For now left out, because the imported target leaks library paths
 install(DIRECTORY api/ DESTINATION include/etcdlib COMPONENT ${ETCDLIB_CMP})