From: Alexander Alekhin Date: Wed, 23 Oct 2013 16:28:22 +0000 (+0400) Subject: cmake: fix bug with installation into OPENCV_LIB_INSTALL_PATH directory X-Git-Tag: accepted/tizen/ivi/20140515.103456~1^2~365^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d571b28eaa99ca4b6f51b31a12283b7bafa0cbb0;p=profile%2Fivi%2Fopencv.git cmake: fix bug with installation into OPENCV_LIB_INSTALL_PATH directory --- diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index 818ec9b..b94d17c 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -467,9 +467,10 @@ function(ocv_install_target) set(isArchive 0) set(isDst 0) + unset(__dst) foreach(e ${ARGN}) if(isDst EQUAL 1) - set(DST "${e}") + set(__dst "${e}") break() endif() if(isArchive EQUAL 1 AND e STREQUAL "DESTINATION") @@ -482,18 +483,20 @@ function(ocv_install_target) endif() endforeach() -# message(STATUS "Process ${__target} dst=${DST}...") - if(NOT DEFINED DST) - set(DST "OPENCV_LIB_INSTALL_PATH") - endif() - - get_target_property(fname ${__target} LOCATION_DEBUG) - string(REPLACE ".lib" ".pdb" fname "${fname}") - install(FILES ${fname} DESTINATION ${DST} CONFIGURATIONS Debug) +# message(STATUS "Process ${__target} dst=${__dst}...") + if(DEFINED __dst) + 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) + endif() - get_target_property(fname ${__target} LOCATION_RELEASE) - string(REPLACE ".lib" ".pdb" fname "${fname}") - install(FILES ${fname} DESTINATION ${DST} CONFIGURATIONS Release) + 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) + endif() + endif() endif() endif() endfunction()