From d0d22b3068d2064ebb6518b35ccd9a3743f6692e Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Mon, 21 Oct 2019 14:19:56 +0000 Subject: [PATCH] cmake: copy wxrc from vcpkg build if not exists Do not copy the `wxrc.exe` from the vcpkg build tree if it has already been copied, as in the case of the appveyor vcpkg installed cache. Signed-off-by: Rafael Kitover --- src/wx/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index 039d2e91..3a1c6755 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -114,7 +114,13 @@ if(WIN32 AND CMAKE_TOOLCHAIN_FILE MATCHES vcpkg AND (X86_32 OR AMD64)) winmm comctl32 oleacc rpcrt4 shlwapi version wsock32 opengl32 ) - file(COPY ${_VCPKG_ROOT_DIR}/buildtrees/wxwidgets/${WINARCH}-windows${suffix}/lib/wxrc.exe DESTINATION ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows/${path_prefix}/bin) + if(NOT EXISTS ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows/${path_prefix}/bin/wxrc.exe) + file( + COPY ${_VCPKG_ROOT_DIR}/buildtrees/wxwidgets/${WINARCH}-windows${suffix}/lib/wxrc.exe + DESTINATION ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows/${path_prefix}/bin + ) + endif() + set(WXRC ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows/${path_prefix}/bin/wxrc.exe) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/zip.exe)