Commit f5bd8fec authored by Roman Donchenko's avatar Roman Donchenko Committed by OpenCV Buildbot

Merge pull request #1674 from alalek:cmake_fix

parents 2279c209 d571b28e
...@@ -467,9 +467,10 @@ function(ocv_install_target) ...@@ -467,9 +467,10 @@ function(ocv_install_target)
set(isArchive 0) set(isArchive 0)
set(isDst 0) set(isDst 0)
unset(__dst)
foreach(e ${ARGN}) foreach(e ${ARGN})
if(isDst EQUAL 1) if(isDst EQUAL 1)
set(DST "${e}") set(__dst "${e}")
break() break()
endif() endif()
if(isArchive EQUAL 1 AND e STREQUAL "DESTINATION") if(isArchive EQUAL 1 AND e STREQUAL "DESTINATION")
...@@ -482,18 +483,20 @@ function(ocv_install_target) ...@@ -482,18 +483,20 @@ function(ocv_install_target)
endif() endif()
endforeach() endforeach()
# message(STATUS "Process ${__target} dst=${DST}...") # message(STATUS "Process ${__target} dst=${__dst}...")
if(NOT DEFINED DST) if(DEFINED __dst)
set(DST "OPENCV_LIB_INSTALL_PATH") get_target_property(fname ${__target} LOCATION_DEBUG)
endif() if(fname MATCHES "\\.lib$")
string(REGEX REPLACE "\\.lib$" ".pdb" fname "${fname}")
get_target_property(fname ${__target} LOCATION_DEBUG) install(FILES ${fname} DESTINATION ${__dst} CONFIGURATIONS Debug)
string(REPLACE ".lib" ".pdb" fname "${fname}") endif()
install(FILES ${fname} DESTINATION ${DST} CONFIGURATIONS Debug)
get_target_property(fname ${__target} LOCATION_RELEASE) get_target_property(fname ${__target} LOCATION_RELEASE)
string(REPLACE ".lib" ".pdb" fname "${fname}") if(fname MATCHES "\\.lib$")
install(FILES ${fname} DESTINATION ${DST} CONFIGURATIONS Release) string(REGEX REPLACE "\\.lib$" ".pdb" fname "${fname}")
install(FILES ${fname} DESTINATION ${__dst} CONFIGURATIONS Release)
endif()
endif()
endif() endif()
endif() endif()
endfunction() endfunction()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment