Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
044680f0
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
044680f0
编写于
4月 01, 2014
作者:
B
BtbN
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add config.h generation and wrapper header, currently only for OBS_VERSION
上级
04dfcb2d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
47 addition
and
4 deletion
+47
-4
CMakeLists.txt
CMakeLists.txt
+4
-2
cmake/Modules/ObsCpack.cmake
cmake/Modules/ObsCpack.cmake
+1
-1
libobs/CMakeLists.txt
libobs/CMakeLists.txt
+10
-1
libobs/config.h.in
libobs/config.h.in
+5
-0
libobs/obs-config.h
libobs/obs-config.h
+27
-0
未找到文件。
CMakeLists.txt
浏览文件 @
044680f0
...
...
@@ -11,8 +11,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
include
(
ObsHelpers
)
include
(
ObsCpack
)
add_definitions
(
-DOBS_VERSION=
"
${
OBS_VERSION
}
"
)
if
(
MSVC AND NOT EXISTS
"
${
CMAKE_BINARY_DIR
}
/ALL_BUILD.vcxproj.user"
)
file
(
GENERATE
OUTPUT
"
${
CMAKE_BINARY_DIR
}
/ALL_BUILD.vcxproj.user"
...
...
@@ -55,6 +53,10 @@ endif()
if
(
NOT INSTALLER_RUN
)
add_subdirectory
(
deps
)
add_definitions
(
-DHAVE_CONFIG_H=1
)
include_directories
(
"
${
CMAKE_BINARY_DIR
}
/config"
)
add_subdirectory
(
libobs
)
if
(
WIN32
)
...
...
cmake/Modules/ObsCpack.cmake
浏览文件 @
044680f0
...
...
@@ -15,7 +15,7 @@ set(CPACK_PACKAGE_VERSION_PATCH "1")
set
(
CPACK_PACKAGE_VERSION
"
${
CPACK_PACKAGE_VERSION_MAJOR
}
.
${
CPACK_PACKAGE_VERSION_MINOR
}
.
${
CPACK_PACKAGE_VERSION_PATCH
}
"
)
if
(
EXISTS
"
${
CMAKE_SOURCE_DIR
}
/.git"
)
execute_process
(
COMMAND git describe --always
execute_process
(
COMMAND git describe --always
--dirty=-modified
OUTPUT_VARIABLE OBS_VERSION
WORKING_DIRECTORY
"
${
CMAKE_SOURCE_DIR
}
"
OUTPUT_STRIP_TRAILING_WHITESPACE
)
...
...
libobs/CMakeLists.txt
浏览文件 @
044680f0
...
...
@@ -17,7 +17,6 @@ include_directories(${Libavformat_INCLUDE_DIR})
add_definitions
(
${
Libavformat_DEFINITIONS
}
)
add_definitions
(
-DLIBOBS_EXPORTS
)
add_definitions
(
-DPTW32_STATIC_LIB
)
if
(
WIN32
)
set
(
libobs_PLATFORM_SOURCES
...
...
@@ -27,6 +26,8 @@ if(WIN32)
set
(
libobs_PLATFORM_DEPS
w32-pthreads
winmm.lib
)
add_definitions
(
-DPTW32_STATIC_LIB
)
elseif
(
APPLE
)
set
(
libobs_PLATFORM_SOURCES
obs-cocoa.c
...
...
@@ -57,6 +58,14 @@ if(MSVC)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/EHc-"
)
endif
()
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/config.h.in"
"
${
CMAKE_BINARY_DIR
}
/config/config.h"
)
set
(
libobs_config_HEADERS
config.h
obs-config.h
)
set
(
libobs_callback_SOURCES
callback/calldata.c
callback/decl.c
...
...
libobs/config.h.in
0 → 100644
浏览文件 @
044680f0
#pragma once
#define OBS_VERSION "@OBS_VERSION@"
libobs/obs-config.h
0 → 100644
浏览文件 @
044680f0
/******************************************************************************
Copyright (C) 2014 by Hugh Bailey <obs.jim@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#pragma once
#ifdef HAVE_CONFIG_H
# include "config.h"
#else
#define OBS_VERSION "unknown"
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录