Add file to find OpenSSL library

This commit is contained in:
Anthony Louis committed 2021-04-09 19:34:23 -03:00
1 parent d55e42504c
commit 7a0ca5c5f4
2 files changed
+41 -2

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# 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.
find_package(OpenSSL)
if (OPENSSL_FOUND)
if (OPENSSL_VERSION LESS "1.0.0")
message(SEND_ERROR "The OpenSSL must be grater than 1.0.0, the actual version is ${OPENSSL_VERSION}")
else ()
message(STATUS "OpenSSL found with ${OPENSSL_VERSION}")
endif ()
else ()
message(SEND_ERROR "Not found the OpenSSL library")
endif ()
if (NOT GANDIVA_OPENSSL_LIBS)
if (WIN32)
if(CMAKE_VERSION VERSION_LESS 3.18)
set(GANDIVA_OPENSSL_LIBS OpenSSL::Crypto OpenSSL::SSL)
else()
set(GANDIVA_OPENSSL_LIBS OpenSSL::Crypto OpenSSL::SSL OpenSSL::applink)
endif ()
else()
set(GANDIVA_OPENSSL_LIBS OpenSSL::Crypto OpenSSL::SSL)
endif()
endif ()
+1 -2
View File
@@ -40,8 +40,7 @@ endif()
add_definitions(-DGANDIVA_LLVM_VERSION=${LLVM_VERSION_MAJOR})
find_package(OpenSSL REQUIRED)
set(GANDIVA_OPENSSL_LIBS OpenSSL::Crypto OpenSSL::SSL)
find_package(OpenSSLAlt REQUIRED)
# Set the path where the bitcode file generated, see precompiled/CMakeLists.txt
set(GANDIVA_PRECOMPILED_BC_PATH "${CMAKE_CURRENT_BINARY_DIR}/irhelpers.bc")