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)
This commit is contained in:
Alexander Karatarakis 2017-11-11 22:43:07 -08:00
parent e4786a054d
commit 6732d76e14
4 changed files with 10 additions and 26 deletions

View File

@ -1,3 +1,3 @@
Source: wincrypt
Version: 0.0
Version: 0.0-1
Description: Windows Cryptography.

View File

@ -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()
endif()
# Allow empty include directory
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)

View File

@ -1,3 +1,3 @@
Source: winsock2
Version: 0.0
Version: 0.0-1
Description: Windows Sockets.

View File

@ -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()
endif()
# Allow empty include directory
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)