From 12d61331d2ce8b9c8aab467d03c9ea30a31b205f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 3 Nov 2016 12:08:24 -0700 Subject: [apr] Retain only dynamic/static files from the corresponding build --- ports/apr/portfile.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index 98557284c..df96d4474 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -29,6 +29,20 @@ vcpkg_install_cmake() # There is no way to suppress installation of the headers in debug builds. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Both dynamic and static are built, so keep only the one needed +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/apr-1.lib + ${CURRENT_PACKAGES_DIR}/lib/aprapp-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/apr-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/aprapp-1.lib) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libapr-1.lib + ${CURRENT_PACKAGES_DIR}/lib/libaprapp-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libapr-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libaprapp-1.lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/apr) file(RENAME ${CURRENT_PACKAGES_DIR}/share/apr/LICENSE ${CURRENT_PACKAGES_DIR}/share/apr/copyright) -- cgit v1.2.3