From 0a77b8c80bc3ae6b10fa159102dc78d1b0fc6918 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Fri, 18 May 2018 16:32:17 +0200
Subject: [PATCH 2/3] do not copy .pdb files that don't exist

---
 source/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 0ea2487c7..f6649ced1 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -554,7 +554,7 @@ if(ENABLE_HDR10_PLUS)
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
 endif()
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
-if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
+if((WIN32 AND ENABLE_CLI AND MSVC_IDE) OR (WIN32 AND ENABLE_SHARED AND MSVC_IDE))
     if(MSVC_IDE)
         install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
         install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
-- 
2.45.0.windows.1

