Skip to content

Commit

Permalink
CMake: fix issue finding openssl include directory for Rust build
Browse files Browse the repository at this point in the history
  • Loading branch information
micahsnyder committed Jan 14, 2025
1 parent ff84050 commit 048eed5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libclamav_rust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
# Copyright (C) 2021-2024 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
#

# if OPENSSL_ROOT_DIR is set, pass it to the environment
if(OPENSSL_ROOT_DIR)
set(ENVIRONMENT "OPENSSL_DIR=${OPENSSL_ROOT_DIR}")
# if OPENSSL_INCLUDE_DIR is set, use it to determine the OPENSSL_DIR
if(OPENSSL_INCLUDE_DIR)
get_filename_component(OPENSSL_DIR ${OPENSSL_INCLUDE_DIR} DIRECTORY)
set(ENVIRONMENT "OPENSSL_DIR=${OPENSSL_DIR}")
else ()
set(ENVIRONMENT "")
endif()
Expand Down

0 comments on commit 048eed5

Please sign in to comment.