File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -607,8 +607,11 @@ function(ocv_install_target)
607
607
set (${__package} _TARGETS "${${__package} _TARGETS}" CACHE INTERNAL "List of ${__package} targets" )
608
608
endif ()
609
609
610
- if (INSTALL_CREATE_DISTRIB )
611
- if (MSVC AND NOT BUILD_SHARED_LIBS )
610
+ if (MSVS )
611
+ if (NOT INSTALL_IGNORE_PDB AND
612
+ (INSTALL_PDB OR
613
+ (INSTALL_CREATE_DISTRIB AND NOT BUILD_SHARED_LIBS )
614
+ ))
612
615
set (__target "${ARGV0} " )
613
616
614
617
set (isArchive 0 )
@@ -636,13 +639,13 @@ function(ocv_install_target)
636
639
get_target_property (fname ${__target} LOCATION_DEBUG )
637
640
if (fname MATCHES "\\ .lib$" )
638
641
string (REGEX REPLACE "\\ .lib$" ".pdb" fname "${fname} " )
639
- install (FILES "${fname} " DESTINATION "${__dst} " CONFIGURATIONS Debug )
642
+ install (FILES "${fname} " DESTINATION "${__dst} " CONFIGURATIONS Debug OPTIONAL )
640
643
endif ()
641
644
642
645
get_target_property (fname ${__target} LOCATION_RELEASE )
643
646
if (fname MATCHES "\\ .lib$" )
644
647
string (REGEX REPLACE "\\ .lib$" ".pdb" fname "${fname} " )
645
- install (FILES "${fname} " DESTINATION "${__dst} " CONFIGURATIONS Release )
648
+ install (FILES "${fname} " DESTINATION "${__dst} " CONFIGURATIONS Release OPTIONAL )
646
649
endif ()
647
650
else ()
648
651
# CMake 2.8.12 broke PDB support for STATIC libraries from MSVS, fix was introduced in CMake 3.1.0.
You can’t perform that action at this time.
0 commit comments