[opencv] 85/89: cmake: update PDB support condition
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sat May 13 09:57:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.
commit b06bd501445b027ac498bcb46dea0aa0461adc8e
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date: Wed Dec 14 14:49:19 2016 +0300
cmake: update PDB support condition
Unfortunately there is no stable support for installation of PDB files in CMake.
This patch is just eliminate problems with modern versions.
---
cmake/OpenCVUtils.cmake | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
index b266a62..55a7acd 100644
--- a/cmake/OpenCVUtils.cmake
+++ b/cmake/OpenCVUtils.cmake
@@ -607,8 +607,11 @@ function(ocv_install_target)
set(${__package}_TARGETS "${${__package}_TARGETS}" CACHE INTERNAL "List of ${__package} targets")
endif()
- if(INSTALL_CREATE_DISTRIB)
- if(MSVC AND NOT BUILD_SHARED_LIBS)
+ if(MSVS)
+ if(NOT INSTALL_IGNORE_PDB AND
+ (INSTALL_PDB OR
+ (INSTALL_CREATE_DISTRIB AND NOT BUILD_SHARED_LIBS)
+ ))
set(__target "${ARGV0}")
set(isArchive 0)
@@ -636,13 +639,13 @@ function(ocv_install_target)
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)
+ install(FILES "${fname}" DESTINATION "${__dst}" CONFIGURATIONS Debug OPTIONAL)
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)
+ install(FILES "${fname}" DESTINATION "${__dst}" CONFIGURATIONS Release OPTIONAL)
endif()
else()
# CMake 2.8.12 broke PDB support for STATIC libraries from MSVS, fix was introduced in CMake 3.1.0.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list