Revert "Merge pull request #2637 from kkartaltepe/cmake-variety-fixes"
This reverts commitd777000a60
, reversing changes made toc9e5f30a78
.
This commit is contained in:
@@ -5,21 +5,22 @@ set_property(CACHE WITH_RTMPS PROPERTY STRINGS AUTO ON OFF)
|
||||
|
||||
option(STATIC_MBEDTLS "Statically link mbedTLS into binary" OFF)
|
||||
|
||||
if (WITH_RTMPS STREQUAL "AUTO")
|
||||
find_package(MbedTLS)
|
||||
find_package(ZLIB)
|
||||
if (NOT MBEDTLS_FOUND OR NOT ZLIB_FOUND)
|
||||
set(WITH_RTMPS "OFF")
|
||||
message(WARNING "mbedTLS or zlib was not found, RTMPS will be auto-disabled")
|
||||
endif()
|
||||
if (WITH_RTMPS OR (WITH_RTMPS STREQUAL "AUTO"))
|
||||
find_package(MbedTLS QUIET)
|
||||
find_package(ZLIB QUIET)
|
||||
endif()
|
||||
|
||||
if (WITH_RTMPS)
|
||||
find_package(MbedTLS REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
if (LIBMBEDTLS_FOUND AND ZLIB_FOUND)
|
||||
add_definitions(-DCRYPTO -DUSE_MBEDTLS)
|
||||
include_directories(${MBEDTLS_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
|
||||
include_directories(${LIBMBEDTLS_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
|
||||
else()
|
||||
if(WITH_RTMPS STREQUAL "AUTO")
|
||||
message(WARNING "mbedTLS was not found, RTMPS will be auto-disabled")
|
||||
elseif (WITH_RTMPS)
|
||||
message(FATAL_ERROR "RTMPS enabled by user, but mbedTLS was not found")
|
||||
endif()
|
||||
unset(LIBMBEDTLS_LIBRARIES)
|
||||
unset(ZLIB_LIBRARIES)
|
||||
add_definitions(-DNO_CRYPTO)
|
||||
endif()
|
||||
|
||||
@@ -171,7 +172,7 @@ add_library(obs-outputs MODULE
|
||||
${obs-outputs_librtmp_HEADERS})
|
||||
target_link_libraries(obs-outputs
|
||||
libobs
|
||||
${MBEDTLS_LIBRARIES}
|
||||
${LIBMBEDTLS_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${ftl_IMPORTS}
|
||||
${obs-outputs_PLATFORM_DEPS})
|
||||
|
Reference in New Issue
Block a user