yolobs-studio/plugins/obs-outputs/CMakeLists.txt

91 lines
1.7 KiB
CMake
Raw Normal View History

2016-02-23 23:16:51 +00:00
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
winmm
Iphlpapi)
endif()
if(MSVC)
set(obs-outputs_PLATFORM_DEPS
${obs-outputs_PLATFORM_DEPS}
w32-pthreads)
endif()
set(obs-outputs_librtmp_HEADERS
librtmp/amf.h
librtmp/bytes.h
librtmp/cencode.h
librtmp/dh.h
librtmp/dhgroups.h
librtmp/handshake.h
librtmp/http.h
librtmp/log.h
librtmp/md5.h
librtmp/rtmp.h
librtmp/rtmp_sys.h)
set(obs-outputs_librtmp_SOURCES
librtmp/amf.c
librtmp/cencode.c
librtmp/hashswf.c
librtmp/log.c
librtmp/md5.c
librtmp/parseurl.c
librtmp/rtmp.c)
if(NOT WIN32)
set_source_files_properties(${obs-outputs_librtmp_SOURCES} PROPERTIES
COMPILE_FLAGS "-fvisibility=hidden")
endif()
set(obs-outputs_HEADERS
obs-output-ver.h
rtmp-helpers.h
2017-04-19 19:54:15 +00:00
rtmp-stream.h
2016-08-28 12:07:43 +00:00
net-if.h
2016-02-23 23:16:51 +00:00
flv-mux.h
flv-output.h
librtmp)
set(obs-outputs_SOURCES
obs-outputs.c
2017-06-29 19:01:10 +00:00
null-output.c
2016-02-23 23:16:51 +00:00
rtmp-stream.c
2017-04-19 19:54:15 +00:00
rtmp-windows.c
2016-02-23 23:16:51 +00:00
flv-output.c
2016-08-28 12:07:43 +00:00
flv-mux.c
net-if.c)
2016-02-23 23:16:51 +00:00
add_library(obs-outputs MODULE
${obs-outputs_SOURCES}
${obs-outputs_HEADER}
${obs-outputs_librtmp_SOURCES}
${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)