obs-outputs: Add USE_SSL option (disabled by default)

Closes jp9000/obs-studio#487
This commit is contained in:
yogpstop
2015-10-26 08:36:19 +00:00
committed by jp9000
parent 77c538bd33
commit 4b4ddbb33e
4 changed files with 112 additions and 2 deletions

View File

@@ -1,5 +1,25 @@
project(obs-outputs)
option(USE_SSL "Enable rtmps support with OpenSSL" OFF)
if (USE_SSL)
find_package(SSL QUIET)
find_package(ZLIB QUIET)
endif()
if (SSL_FOUND AND ZLIB_FOUND)
add_definitions(-DCRYPTO -DUSE_OPENSSL)
include_directories(${SSL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
else()
if (USE_SSL)
message(WARNING "SSL enabled by user, but OpenSSL was not found")
endif()
unset(SSL_LIBRARIES)
unset(ZLIB_LIBRARIES)
add_definitions(-DNO_CRYPTO)
endif()
if(WIN32)
set(obs-outputs_PLATFORM_DEPS
ws2_32
@@ -58,6 +78,8 @@ add_library(obs-outputs MODULE
${obs-outputs_librtmp_HEADERS})
target_link_libraries(obs-outputs
libobs
${SSL_LIBRARIES}
${ZLIB_LIBRARIES}
${obs-outputs_PLATFORM_DEPS})
install_obs_plugin_with_data(obs-outputs data)

View File

@@ -25,8 +25,6 @@
* http://www.gnu.org/copyleft/lgpl.html
*/
#define NO_CRYPTO 1
#if !defined(NO_CRYPTO) && !defined(CRYPTO)
#define CRYPTO
#else