代码拉取完成,页面将自动刷新
同步操作将从 樊世超/obs studio-multi-rtmp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.16)
project(obs-multi-rtmp VERSION 0.2.4)
set(QTDIR "${QTDIR}" CACHE PATH "Path to qt directory")
list(APPEND CMAKE_PREFIX_PATH "${QTDIR}")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
set(LIB_OBS libobs)
# build obs lib
if (WIN32)
# Windows
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
set(PLAT "32bit")
set(LINK_PLAT "x86")
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PLAT "64bit")
set(LINK_PLAT "x64")
else ()
message(FATAL_ERROR "Unsupported Architecture!")
endif ()
if (NOT DEFINED OBS_SRC_DIR)
set(OBS_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/obs-src")
endif ()
if (NOT DEFINED OBS_BIN_DIR)
set(OBS_BIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/obs-bin")
endif ()
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${OBS_BIN_DIR}" CACHE PATH "" FORCE)
endif ()
execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/pexports.exe"
"${OBS_BIN_DIR}/bin/${PLAT}/obs.dll"
OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/libobs.def"
COMMAND_ECHO STDOUT
)
execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/pexports.exe"
"${OBS_BIN_DIR}/bin/${PLAT}/obs-frontend-api.dll"
OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/obs-frontend-api.def"
COMMAND_ECHO STDOUT
)
execute_process(COMMAND ${CMAKE_LINKER}
"/lib" "/MACHINE:${LINK_PLAT}"
"/def:${CMAKE_CURRENT_BINARY_DIR}/libobs.def"
"/out:${CMAKE_CURRENT_BINARY_DIR}/libobs.lib"
)
execute_process(COMMAND ${CMAKE_LINKER}
"/lib" "/MACHINE:${LINK_PLAT}"
"/def:${CMAKE_CURRENT_BINARY_DIR}/obs-frontend-api.def"
"/out:${CMAKE_CURRENT_BINARY_DIR}/obs-frontend-api.lib"
)
elseif (APPLE)
# macOS
find_library(_LIB_OBS "${LIB_OBS}.0.dylib" PATHS ${OBS_BIN_DIR} REQUIRED)
set(LIB_OBS "${_LIB_OBS}")
elseif (UNIX)
# Linux
find_package(LibObs REQUIRED)
else ()
message(FATAL_ERROR "Unsupported OS!")
endif ()
add_library(obs-multi-rtmp SHARED
"src/obs-multi-rtmp.cpp"
"src/obs-multi-rtmp.h"
)
if (WIN32)
configure_file("src/version.rc.in" "${CMAKE_CURRENT_BINARY_DIR}/version.rc")
target_sources(obs-multi-rtmp PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}/version.rc"
)
endif ()
target_include_directories(obs-multi-rtmp PRIVATE
"${OBS_SRC_DIR}/libobs"
"${OBS_SRC_DIR}/UI/obs-frontend-api"
)
target_link_directories(obs-multi-rtmp PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}"
${OBS_BIN_DIR}
)
target_link_libraries(obs-multi-rtmp PRIVATE
Qt5::Widgets
${LIB_OBS}
obs-frontend-api
)
if (WIN32)
install(TARGETS obs-multi-rtmp RUNTIME
DESTINATION "obs-plugins/${PLAT}"
)
install(DIRECTORY locale
DESTINATION "data/obs-plugins/obs-multi-rtmp"
)
elseif (APPLE)
set_target_properties(obs-multi-rtmp PROPERTIES
PREFIX ""
SUFFIX ".so"
)
install(TARGETS obs-multi-rtmp LIBRARY
DESTINATION "obs-studio/plugins/obs-multi-rtmp/bin"
)
install(DIRECTORY locale
DESTINATION "obs-studio/plugins/obs-multi-rtmp/data"
)
elseif (UNIX)
set_target_properties(obs-multi-rtmp PROPERTIES PREFIX "")
install(TARGETS obs-multi-rtmp LIBRARY
DESTINATION "lib/obs-plugins"
)
install(DIRECTORY locale
DESTINATION "share/obs/obs-plugins/obs-multi-rtmp"
)
endif ()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。