Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenCV
opencv
提交
784c8436
O
opencv
项目概览
OpenCV
/
opencv
上一次同步 9 个月
通知
992
Star
71100
Fork
55581
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
784c8436
编写于
4月 09, 2018
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cmake: update PDB installation
上级
474a23bd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
23 deletion
+30
-23
3rdparty/protobuf/CMakeLists.txt
3rdparty/protobuf/CMakeLists.txt
+2
-0
cmake/OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+28
-23
未找到文件。
3rdparty/protobuf/CMakeLists.txt
浏览文件 @
784c8436
...
...
@@ -142,6 +142,8 @@ set_target_properties(libprotobuf
FOLDER
"3rdparty"
OUTPUT_NAME libprotobuf
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
COMPILE_PDB_NAME libprotobuf
COMPILE_PDB_NAME_DEBUG
"libprotobuf
${
OPENCV_DEBUG_POSTFIX
}
"
ARCHIVE_OUTPUT_DIRECTORY
${
3P_LIBRARY_OUTPUT_PATH
}
)
...
...
cmake/OpenCVUtils.cmake
浏览文件 @
784c8436
...
...
@@ -1027,14 +1027,17 @@ function(ocv_install_target)
set
(
${
__package
}
_TARGETS
"
${${
__package
}
_TARGETS
}
"
CACHE INTERNAL
"List of
${
__package
}
targets"
)
endif
()
if
(
MSVS
)
if
(
NOT INSTALL_IGNORE_PDB AND
(
INSTALL_PDB OR
(
INSTALL_CREATE_DISTRIB AND NOT BUILD_SHARED_LIBS
)
))
if
(
MSVC
)
if
(
INSTALL_PDB
AND
(
NOT INSTALL_IGNORE_PDB
))
set
(
__target
"
${
ARGV0
}
"
)
set
(
isArchive 0
)
set
(
__location_key
"ARCHIVE"
)
# static libs
get_target_property
(
__target_type
${
__target
}
TYPE
)
if
(
"
${
__target_type
}
"
STREQUAL
"SHARED_LIBRARY"
)
set
(
__location_key
"RUNTIME"
)
# shared libs (.DLL)
endif
()
set
(
processDst 0
)
set
(
isDst 0
)
unset
(
__dst
)
foreach
(
e
${
ARGN
}
)
...
...
@@ -1042,34 +1045,36 @@ function(ocv_install_target)
set
(
__dst
"
${
e
}
"
)
break
()
endif
()
if
(
isArchive
EQUAL 1 AND e STREQUAL
"DESTINATION"
)
if
(
processDst
EQUAL 1 AND e STREQUAL
"DESTINATION"
)
set
(
isDst 1
)
endif
()
if
(
e STREQUAL
"
ARCHIVE
"
)
set
(
isArchive
1
)
if
(
e STREQUAL
"
${
__location_key
}
"
)
set
(
processDst
1
)
else
()
set
(
isArchive
0
)
set
(
processDst
0
)
endif
()
endforeach
()
# message(STATUS "Process ${__target} dst=${__dst}...")
if
(
DEFINED __dst
)
# If CMake version is >=3.1.0 or <2.8.12.
if
(
NOT CMAKE_VERSION VERSION_LESS 3.1.0 OR CMAKE_VERSION VERSION_LESS 2.8.12
)
get_target_property
(
fname
${
__target
}
LOCATION_DEBUG
)
if
(
fname MATCHES
"
\\
.lib$"
)
string
(
REGEX REPLACE
"
\\
.lib$"
".pdb"
fname
"
${
fname
}
"
)
install
(
FILES
"
${
fname
}
"
DESTINATION
"
${
__dst
}
"
CONFIGURATIONS Debug OPTIONAL
)
if
(
NOT CMAKE_VERSION VERSION_LESS 3.1.0
)
set
(
__pdb_install_component
"pdb"
)
if
(
DEFINED INSTALL_PDB_COMPONENT AND INSTALL_PDB_COMPONENT
)
set
(
__pdb_install_component
"
${
INSTALL_PDB_COMPONENT
}
"
)
endif
()
get_target_property
(
fname
${
__target
}
LOCATION_RELEASE
)
if
(
fname MATCHES
"
\\
.lib$"
)
string
(
REGEX REPLACE
"
\\
.lib$"
".pdb"
fname
"
${
fname
}
"
)
install
(
FILES
"
${
fname
}
"
DESTINATION
"
${
__dst
}
"
CONFIGURATIONS Release OPTIONAL
)
# message(STATUS "Adding PDB file installation rule: target=${__target} dst=${__dst} component=${__pdb_install_component}")
if
(
"
${
__target_type
}
"
STREQUAL
"SHARED_LIBRARY"
)
install
(
FILES
"$<TARGET_PDB_FILE:
${
__target
}
>"
DESTINATION
"
${
__dst
}
"
COMPONENT
${
__pdb_install_component
}
OPTIONAL
)
else
()
# There is no generator expression similar to TARGET_PDB_FILE and TARGET_PDB_FILE can't be used: https://gitlab.kitware.com/cmake/cmake/issues/16932
# However we still want .pdb files like: 'lib/Debug/opencv_core341d.pdb' or '3rdparty/lib/zlibd.pdb'
install
(
FILES
"$<TARGET_PROPERTY:
${
__target
}
,ARCHIVE_OUTPUT_DIRECTORY>/$<CONFIG>/$<IF:$<BOOL:$<TARGET_PROPERTY:
${
__target
}
,COMPILE_PDB_NAME_DEBUG>>,$<TARGET_PROPERTY:
${
__target
}
,COMPILE_PDB_NAME_DEBUG>,$<TARGET_PROPERTY:
${
__target
}
,COMPILE_PDB_NAME>>.pdb"
DESTINATION
"
${
__dst
}
"
CONFIGURATIONS Debug COMPONENT
${
__pdb_install_component
}
OPTIONAL
)
install
(
FILES
"$<TARGET_PROPERTY:
${
__target
}
,ARCHIVE_OUTPUT_DIRECTORY>/$<CONFIG>/$<IF:$<BOOL:$<TARGET_PROPERTY:
${
__target
}
,COMPILE_PDB_NAME_RELEASE>>,$<TARGET_PROPERTY:
${
__target
}
,COMPILE_PDB_NAME_RELEASE>,$<TARGET_PROPERTY:
${
__target
}
,COMPILE_PDB_NAME>>.pdb"
DESTINATION
"
${
__dst
}
"
CONFIGURATIONS Release COMPONENT
${
__pdb_install_component
}
OPTIONAL
)
endif
()
else
()
# CMake 2.8.12 broke PDB support for STATIC libraries from MSVS, fix was introduced in CMake 3.1.0.
message
(
WARNING
"PDB's are not supported from this version of CMake, use CMake version later then 3.1.0 or before 2.8.12."
)
message
(
WARNING
"PDB files installation is not supported (need CMake >= 3.1.0)"
)
endif
()
endif
()
endif
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录