From 6732d76e14678b51a69a8ae4b151e3d4fce6edaf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 11 Nov 2017 22:43:07 -0800 Subject: [PATCH] Fix header conflict caused by wincrypt/winsock2 and older Windows SDKs If a project was using Windows 7 SDK and vcpkg was integrated, the project would fail to build (the vcpkg ports use Windows 8.1/10 SDK) --- ports/wincrypt/CONTROL | 2 +- ports/wincrypt/portfile.cmake | 16 ++++------------ ports/winsock2/CONTROL | 2 +- ports/winsock2/portfile.cmake | 16 ++++------------ 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/ports/wincrypt/CONTROL b/ports/wincrypt/CONTROL index 78803229c..c83865407 100644 --- a/ports/wincrypt/CONTROL +++ b/ports/wincrypt/CONTROL @@ -1,3 +1,3 @@ Source: wincrypt -Version: 0.0 +Version: 0.0-1 Description: Windows Cryptography. \ No newline at end of file diff --git a/ports/wincrypt/portfile.cmake b/ports/wincrypt/portfile.cmake index 8ded1cdc4..6ce62cfee 100644 --- a/ports/wincrypt/portfile.cmake +++ b/ports/wincrypt/portfile.cmake @@ -18,17 +18,6 @@ if (NOT EXISTS "${LIBFILEPATH}") message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") endif() -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/include - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug/lib - ${CURRENT_PACKAGES_DIR}/share/wincrypt -) - -file(COPY - "${HEADERSPATH}\\Wincrypt.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) @@ -37,4 +26,7 @@ if (DEFINED LICENSEPATH) file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See the accompanying sdk_license.rtf") else() file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") -endif() \ No newline at end of file +endif() + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) \ No newline at end of file diff --git a/ports/winsock2/CONTROL b/ports/winsock2/CONTROL index 4b56e50bf..298fd7ebd 100644 --- a/ports/winsock2/CONTROL +++ b/ports/winsock2/CONTROL @@ -1,3 +1,3 @@ Source: winsock2 -Version: 0.0 +Version: 0.0-1 Description: Windows Sockets. \ No newline at end of file diff --git a/ports/winsock2/portfile.cmake b/ports/winsock2/portfile.cmake index 81fd38992..0f55c1227 100644 --- a/ports/winsock2/portfile.cmake +++ b/ports/winsock2/portfile.cmake @@ -18,17 +18,6 @@ if (NOT EXISTS "${LIBFILEPATH}") message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") endif() -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/include - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug/lib - ${CURRENT_PACKAGES_DIR}/share/winsock2 -) - -file(COPY - "${HEADERSPATH}\\Winsock2.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) @@ -37,4 +26,7 @@ if (DEFINED LICENSEPATH) file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See the accompanying sdk_license.rtf") else() file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") -endif() \ No newline at end of file +endif() + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) \ No newline at end of file