Skip to content

Commit

Permalink
Don't use OPENSSL_ROOT_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeiignatov authored and rndi committed Dec 12, 2018
1 parent 838eda0 commit d783f2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ option(USE_GNUTLS "Should use gnutls instead of openssl" OFF)
option(ENABLE_CXX_DEPS "Extra library dependencies in srt.pc for the CXX libraries useful with C language" ON)
option(USE_STATIC_LIBSTDCXX "Should use static rather than shared libstdc++" OFF)
option(ENABLE_INET_PTON "Set to OFF to prevent usage of inet_pton when building against modern SDKs while still requiring compatibility with older Windows versions, such as Windows XP, Windows Server 2003 etc." ON)
option(USE_OPENSSL_PC "Use pkg-config to find OpenSSL libraries" ON)

set(TARGET_srt "srt" CACHE STRING "The name for the haisrt library")

Expand Down Expand Up @@ -186,13 +187,10 @@ if ( USE_GNUTLS )
else()
message(STATUS "SSL Dependency: using OpenSSL (default)")

# if OPENSSL_ROOT_DIR or USE_OPENSSL_PC are set, we assume
# that the user wants to use find_package(OpenSSL) method to
# find OpenSSL package. Otherwise default to pkg-config.
if (NOT IOS)
if (NOT OPENSSL_ROOT_DIR OR USE_OPENSSL_PC)
pkg_check_modules(SSL "openssl libcrypto")
endif()
# Try using pkg-config method first if enabled,
# fall back to find_package method otherwise
if (USE_OPENSSL_PC)
pkg_check_modules(SSL "openssl libcrypto")
endif()
if (SSL_FOUND)
set (SSL_REQUIRED_MODULES "openssl libcrypto")
Expand Down
2 changes: 1 addition & 1 deletion docs/build_iOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Results (both libraries and headers) will be placed in bin/<SDK_VERSION>-&
Now you can build SRT providing path to OpenSSL library and toolchain file for iOS

```
./configure --cmake-prefix-path=$IOS_OPENSSL --cmake-toolchain-file=scripts/iOS.cmake
./configure --cmake-prefix-path=$IOS_OPENSSL --use-openssl-pc=OFF --cmake-toolchain-file=scripts/iOS.cmake
make
```

Expand Down

0 comments on commit d783f2e

Please sign in to comment.