Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
b0e8ba6d
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
b0e8ba6d
编写于
5月 21, 2020
作者:
J
Jim
提交者:
GitHub
5月 21, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2972 from kkartaltepe/cmake-variety-fixes
cmake: Fix warnings and normalize variables/errors
上级
66518035
d928bfd1
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
63 addition
and
83 deletion
+63
-83
UI/win-update/updater/CMakeLists.txt
UI/win-update/updater/CMakeLists.txt
+0
-2
cmake/Modules/FindLibVLC.cmake
cmake/Modules/FindLibVLC.cmake
+3
-9
cmake/Modules/FindLibv4l2.cmake
cmake/Modules/FindLibv4l2.cmake
+1
-1
cmake/Modules/FindMbedTLS.cmake
cmake/Modules/FindMbedTLS.cmake
+10
-16
cmake/Modules/FindUDev.cmake
cmake/Modules/FindUDev.cmake
+1
-1
cmake/Modules/FindVulkan.cmake
cmake/Modules/FindVulkan.cmake
+1
-1
cmake/Modules/FindXCB.cmake
cmake/Modules/FindXCB.cmake
+6
-15
cmake/Modules/FindZLIB.cmake
cmake/Modules/FindZLIB.cmake
+1
-4
libobs/CMakeLists.txt
libobs/CMakeLists.txt
+1
-1
plugins/linux-v4l2/CMakeLists.txt
plugins/linux-v4l2/CMakeLists.txt
+18
-13
plugins/obs-outputs/CMakeLists.txt
plugins/obs-outputs/CMakeLists.txt
+12
-13
plugins/vlc-video/CMakeLists.txt
plugins/vlc-video/CMakeLists.txt
+9
-7
未找到文件。
UI/win-update/updater/CMakeLists.txt
浏览文件 @
b0e8ba6d
...
...
@@ -14,8 +14,6 @@ include_directories(${LIBLZMA_INCLUDE_DIRS})
include_directories
(
SYSTEM
"
${
CMAKE_SOURCE_DIR
}
/libobs"
)
include_directories
(
${
BLAKE2_INCLUDE_DIR
}
)
find_package
(
ZLIB REQUIRED
)
set
(
updater_HEADERS
../win-update-helpers.hpp
resource.h
...
...
cmake/Modules/FindLibVLC.cmake
浏览文件 @
b0e8ba6d
...
...
@@ -4,9 +4,6 @@
# LIBVLC_INCLUDE_DIRS
# LIBVLC_LIBRARIES
#
# For use in OBS:
#
# VLC_INCLUDE_DIR
find_package
(
PkgConfig QUIET
)
if
(
PKG_CONFIG_FOUND
)
...
...
@@ -59,14 +56,11 @@ find_library(VLC_LIB
../bin
${
_lib_suffix
}
../bin
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
LibVLC_INCLUDES DEFAULT_MSG VLC_INCLUDE_DIR
)
find_package_handle_standard_args
(
LibVLC DEFAULT_MSG VLC_
LIB VLC_
INCLUDE_DIR
)
# OBS doesnt depend on linking, so we dont include VLC_LIB here as required.
find_package_handle_standard_args
(
LibVLC DEFAULT_MSG VLC_INCLUDE_DIR
)
mark_as_advanced
(
VLC_INCLUDE_DIR VLC_LIB
)
if
(
LIBVLC_INCLUDES_FOUND
)
set
(
LIBVLC_INCLUDE_DIRS
${
VLC_INCLUDE_DIR
}
)
endif
()
if
(
LIBVLC_FOUND
)
set
(
LIBVLC_LIBRARIES
${
VLC_LIB
}
)
set
(
LIBVLC_INCLUDE_DIRS
${
VLC_INCLUDE_DIR
}
)
endif
()
cmake/Modules/FindLibv4l2.cmake
浏览文件 @
b0e8ba6d
...
...
@@ -24,7 +24,7 @@ find_library(V4L2_LIB
/usr/lib /usr/local/lib /opt/local/lib
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Lib
V4L
2 DEFAULT_MSG V4L2_LIB V4L2_INCLUDE_DIR
)
find_package_handle_standard_args
(
Lib
v4l
2 DEFAULT_MSG V4L2_LIB V4L2_INCLUDE_DIR
)
mark_as_advanced
(
V4L2_INCLUDE_DIR V4L2_LIB
)
if
(
LIBV4L2_FOUND
)
...
...
cmake/Modules/FindMbedTLS.cmake
浏览文件 @
b0e8ba6d
# Once done these will be defined:
#
#
LIB
MBEDTLS_FOUND
#
LIB
MBEDTLS_INCLUDE_DIRS
#
LIB
MBEDTLS_LIBRARIES
# MBEDTLS_FOUND
# MBEDTLS_INCLUDE_DIRS
# MBEDTLS_LIBRARIES
#
# For use in OBS:
#
# MBEDTLS_INCLUDE_DIR
find_package
(
PkgConfig QUIET
)
if
(
PKG_CONFIG_FOUND
)
...
...
@@ -122,22 +119,19 @@ endif()
# If we find all three libraries, then go ahead.
if
(
MBEDTLS_LIB AND MBEDCRYPTO_LIB AND MBEDX509_LIB
)
set
(
LIBMBEDTLS_INCLUDE_DIRS
${
MBEDTLS_INCLUDE_DIR
}
)
set
(
LIBMBEDTLS_LIBRARIES
${
MBEDTLS_LIB
}
${
MBEDCRYPTO_LIB
}
${
MBEDX509_LIB
}
)
set
(
MBEDTLS_INCLUDE_DIRS
${
LIBMBEDTLS_INCLUDE_DIRS
}
)
set
(
MBEDTLS_LIBRARIES
${
LIBMBEDTLS_LIBRARIES
}
)
set
(
MBEDTLS_INCLUDE_DIRS
${
MBEDTLS_INCLUDE_DIR
}
)
set
(
MBEDTLS_LIBRARIES
${
MBEDTLS_LIB
}
${
MBEDCRYPTO_LIB
}
${
MBEDX509_LIB
}
)
# Otherwise, if we find MBEDTLS_LIB, and it has both CRYPTO and x509
# within the single lib (i.e. a windows build environment), then also
# feel free to go ahead.
elseif
(
MBEDTLS_LIB AND MBEDTLS_INCLUDES_CRYPTO AND MBEDTLS_INCLUDES_X509
)
set
(
LIBMBEDTLS_INCLUDE_DIRS
${
MBEDTLS_INCLUDE_DIR
}
)
set
(
LIBMBEDTLS_LIBRARIES
${
MBEDTLS_LIB
}
)
set
(
MBEDTLS_INCLUDE_DIRS
${
LIBMBEDTLS_INCLUDE_DIRS
}
)
set
(
MBEDTLS_LIBRARIES
${
LIBMBEDTLS_LIBRARIES
}
)
set
(
MBEDTLS_INCLUDE_DIRS
${
MBEDTLS_INCLUDE_DIR
}
)
set
(
MBEDTLS_LIBRARIES
${
MBEDTLS_LIB
}
)
endif
()
# Now we've accounted for the 3-vs-1 library case:
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Libmbedtls DEFAULT_MSG MBEDTLS_LIBRARIES MBEDTLS_INCLUDE_DIRS
)
mark_as_advanced
(
MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARIES MBEDTLS_INCLUDE_DIRS
)
find_package_handle_standard_args
(
MbedTLS DEFAULT_MSG MBEDTLS_LIBRARIES MBEDTLS_INCLUDE_DIRS
)
mark_as_advanced
(
MBEDTLS_INCLUDE_DIR MBEDTLS_LIB MBEDCRYPTO_LIB MBEDX509_LIB
)
cmake/Modules/Find
Lib
UDev.cmake
→
cmake/Modules/FindUDev.cmake
浏览文件 @
b0e8ba6d
...
...
@@ -6,7 +6,7 @@
find_package
(
PkgConfig QUIET
)
if
(
PKG_CONFIG_FOUND
)
pkg_check_modules
(
_UDEV QUIET udev
)
pkg_check_modules
(
_UDEV QUIET
lib
udev
)
endif
()
find_path
(
UDEV_INCLUDE_DIR
...
...
cmake/Modules/FindVulkan.cmake
浏览文件 @
b0e8ba6d
...
...
@@ -61,7 +61,7 @@ find_library(VULKAN_LIB
../bin
${
_lib_suffix
}
../bin
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
v
ulkan DEFAULT_MSG VULKAN_LIB VULKAN_INCLUDE_DIR
)
find_package_handle_standard_args
(
V
ulkan DEFAULT_MSG VULKAN_LIB VULKAN_INCLUDE_DIR
)
mark_as_advanced
(
VULKAN_INCLUDE_DIR VULKAN_LIB
)
if
(
VULKAN_FOUND
)
...
...
cmake/Modules/FindXCB.cmake
浏览文件 @
b0e8ba6d
...
...
@@ -204,30 +204,19 @@ macro(_XCB_HANDLE_COMPONENT _comp)
find_path
(
XCB_
${
_comp
}
_INCLUDE_DIR NAMES
${
_header
}
HINTS
${
PKG_XCB_INCLUDE_DIRS
}
)
find_library
(
XCB_
${
_comp
}
_LIBRARY NAMES
${
_lib
}
HINTS
${
PKG_XCB_LIBRARY_DIRS
}
)
mark_as_advanced
(
XCB_
${
_comp
}
_LIBRARY XCB_
${
_comp
}
_INCLUDE_DIR
)
if
(
XCB_
${
_comp
}
_INCLUDE_DIR AND XCB_
${
_comp
}
_LIBRARY
)
set
(
XCB_
${
_comp
}
_FOUND TRUE
)
list
(
APPEND XCB_INCLUDE_DIRS
${
XCB_
${
_comp
}
_INCLUDE_DIR
}
)
list
(
APPEND XCB_LIBRARIES
${
XCB_
${
_comp
}
_LIBRARY
}
)
if
(
NOT XCB_FIND_QUIETLY
)
message
(
STATUS
"XCB[
${
_comp
}
]: Found component
${
_comp
}
"
)
endif
()
endif
()
if
(
XCB_FIND_REQUIRED_
${
_comp
}
)
list
(
APPEND requiredComponents XCB_
${
_comp
}
_FOUND
)
endif
()
find_package_handle_standard_args
(
XCB_
${
_comp
}
DEFAULT_MSG XCB_
${
_comp
}
_LIBRARY XCB_
${
_comp
}
_INCLUDE_DIR
)
mark_as_advanced
(
XCB_
${
_comp
}
_LIBRARY XCB_
${
_comp
}
_INCLUDE_DIR
)
# compatibility for old variable naming
set
(
XCB_
${
_comp
}
_INCLUDE_DIRS
${
XCB_
${
_comp
}
_INCLUDE_DIR
}
)
set
(
XCB_
${
_comp
}
_LIBRARIES
${
XCB_
${
_comp
}
_LIBRARY
}
)
endmacro
()
IF
(
NOT WIN32
)
include
(
FindPackageHandleStandardArgs
)
# Use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package
(
PkgConfig
)
...
...
@@ -243,9 +232,11 @@ IF (NOT WIN32)
list
(
REMOVE_DUPLICATES XCB_INCLUDE_DIRS
)
endif
()
find_package_handle_standard_args
(
XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIRS
${
requiredComponents
}
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
XCB
REQUIRED_VARS XCB_LIBRARIES XCB_INCLUDE_DIRS
HANDLE_COMPONENTS
)
# compatibility for old variable naming
set
(
XCB_INCLUDE_DIR
${
XCB_INCLUDE_DIRS
}
)
ENDIF
(
NOT WIN32
)
cmake/Modules/FindZLIB.cmake
浏览文件 @
b0e8ba6d
...
...
@@ -4,9 +4,6 @@
# ZLIB_INCLUDE_DIRS
# ZLIB_LIBRARIES
#
# For use in OBS:
#
# ZLIB_INCLUDE_DIR
find_package
(
PkgConfig QUIET
)
if
(
PKG_CONFIG_FOUND
)
...
...
@@ -59,7 +56,7 @@ find_library(ZLIB_LIB
../bin
${
_lib_suffix
}
../bin
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
zlib
DEFAULT_MSG ZLIB_LIB ZLIB_INCLUDE_DIR
)
find_package_handle_standard_args
(
ZLIB
DEFAULT_MSG ZLIB_LIB ZLIB_INCLUDE_DIR
)
mark_as_advanced
(
ZLIB_INCLUDE_DIR ZLIB_LIB
)
if
(
ZLIB_FOUND
)
...
...
libobs/CMakeLists.txt
浏览文件 @
b0e8ba6d
...
...
@@ -74,7 +74,7 @@ endif()
find_package
(
ZLIB REQUIRED
)
include_directories
(
SYSTEM
${
ZLIB_INCLUDE_DIR
}
)
include_directories
(
SYSTEM
${
ZLIB_INCLUDE_DIR
S
}
)
add_definitions
(
-DLIBOBS_EXPORTS
)
...
...
plugins/linux-v4l2/CMakeLists.txt
浏览文件 @
b0e8ba6d
...
...
@@ -5,23 +5,28 @@ if(DISABLE_V4L2)
return
()
endif
()
find_package
(
Libv4l2
)
find_package
(
LibUDev QUIET
)
if
(
NOT LIBV4L2_FOUND AND ENABLE_V4L2
)
message
(
FATAL_ERROR
"libv4l2 not found bit plugin set as enabled"
)
elseif
(
NOT LIBV4L2_FOUND
)
message
(
STATUS
"libv4l2 not found, disabling v4l2 plugin"
)
return
()
if
(
ENABLE_V4L2
)
find_package
(
Libv4l2 REQUIRED
)
else
()
find_package
(
Libv4l2
)
if
(
NOT LIBV4L2_FOUND
)
message
(
STATUS
"libv4l2 not found, disabling v4l2 plugin"
)
return
()
endif
()
endif
()
if
(
NOT UDEV_FOUND OR DISABLE_UDEV
)
message
(
STATUS
"udev disabled for v4l2 plugin"
)
else
()
set
(
linux-v4l2-udev_SOURCES
v4l2-udev.c
)
if
(
DISABLE_UDEV
)
add_definitions
(
-DHAVE_UDEV
)
else
()
find_package
(
UDev
)
if
(
NOT UDEV_FOUND
)
message
(
STATUS
"udev disabled for v4l2 plugin"
)
else
()
set
(
linux-v4l2-udev_SOURCES
v4l2-udev.c
)
endif
()
endif
()
include_directories
(
...
...
plugins/obs-outputs/CMakeLists.txt
浏览文件 @
b0e8ba6d
...
...
@@ -5,22 +5,21 @@ set_property(CACHE WITH_RTMPS PROPERTY STRINGS AUTO ON OFF)
option
(
STATIC_MBEDTLS
"Statically link mbedTLS into binary"
OFF
)
if
(
WITH_RTMPS
OR
(
WITH_RTMPS STREQUAL
"AUTO"
))
find_package
(
MbedTLS QUIET
)
find_package
(
ZLIB QUIET
)
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
()
endif
()
if
(
LIBMBEDTLS_FOUND AND ZLIB_FOUND
)
if
(
WITH_RTMPS
)
find_package
(
MbedTLS REQUIRED
)
find_package
(
ZLIB REQUIRED
)
add_definitions
(
-DCRYPTO -DUSE_MBEDTLS
)
include_directories
(
${
LIB
MBEDTLS_INCLUDE_DIRS
}
${
ZLIB_INCLUDE_DIRS
}
)
include_directories
(
${
MBEDTLS_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
()
...
...
@@ -172,7 +171,7 @@ add_library(obs-outputs MODULE
${
obs-outputs_librtmp_HEADERS
}
)
target_link_libraries
(
obs-outputs
libobs
${
LIB
MBEDTLS_LIBRARIES
}
${
MBEDTLS_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
ftl_IMPORTS
}
${
obs-outputs_PLATFORM_DEPS
}
)
...
...
plugins/vlc-video/CMakeLists.txt
浏览文件 @
b0e8ba6d
...
...
@@ -5,13 +5,14 @@ if(DISABLE_VLC)
return
()
endif
()
find_package
(
LibVLC QUIET
)
if
(
NOT LIBVLC_INCLUDES_FOUND AND ENABLE_VLC
)
message
(
FATAL_ERROR
"LibVLC includes not found but set as enabled"
)
elseif
(
NOT LIBVLC_INCLUDES_FOUND
)
message
(
STATUS
"LibVLC includes not found, VLC video plugin disabled"
)
return
()
if
(
ENABLE_VLC
)
find_package
(
LibVLC REQUIRED
)
else
()
find_package
(
LibVLC
)
if
(
NOT LibVLC_FOUND
)
message
(
STATUS
"VLC video plugin disabled"
)
return
()
endif
()
endif
()
include_directories
(
${
LIBVLC_INCLUDE_DIRS
}
)
...
...
@@ -41,6 +42,7 @@ endif()
add_library
(
vlc-video MODULE
${
vlc-video_SOURCES
}
${
vlc-video_HEADERS
}
)
# instead of linking vlc we load at runtime.
target_link_libraries
(
vlc-video
libobs
${
vlc-video_PLATFORM_DEPS
}
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录