summaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsopenssl
diff options
context:
space:
mode:
authorPing Yu <ping.yu@intel.com>2018-09-27 08:49:33 -0400
committerFlorin Coras <florin.coras@gmail.com>2018-09-27 14:30:47 +0000
commit7d7b8c6dd7dc7a3efa89bb7b7c34742939b225fd (patch)
treeb1fb57c2ef000b3bd9c7d89fca654d0cb8fb5a1e /src/plugins/tlsopenssl
parent258c2f6c6339d5261d3b4edc9197cbbf9157378e (diff)
add cmake build option to build openssl async
This code is orignally in automake, but it is missing in cmake. Thus add it to make openssl async work in cmake build system Change-Id: Ie69ee9c2099273e51ce13ccab27bdd2619db4814 Signed-off-by: Ping Yu <ping.yu@intel.com>
Diffstat (limited to 'src/plugins/tlsopenssl')
-rw-r--r--src/plugins/tlsopenssl/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/tlsopenssl/CMakeLists.txt b/src/plugins/tlsopenssl/CMakeLists.txt
index 609be907040..ad34cfaa90d 100644
--- a/src/plugins/tlsopenssl/CMakeLists.txt
+++ b/src/plugins/tlsopenssl/CMakeLists.txt
@@ -11,6 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+include (CheckFunctionExists)
if(OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
add_vpp_plugin(tlsopenssl
@@ -21,5 +22,15 @@ if(OPENSSL_FOUND)
LINK_LIBRARIES
${OPENSSL_LIBRARIES}
)
+
+ set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
+ set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
+ check_function_exists(SSL_set_async_callback HAVE_OPENSSL_ASYNC)
+
+ if (HAVE_OPENSSL_ASYNC)
+ add_definitions(-DHAVE_OPENSSL_ASYNC)
+ endif()
+
+
endif()