early-access version 2853
This commit is contained in:
29
externals/vcpkg/ports/cryptopp/cmake.patch
vendored
Executable file
29
externals/vcpkg/ports/cryptopp/cmake.patch
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fb43b95..c39e470 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -451,6 +451,10 @@ if (MSVC)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
+if(WINDOWS_STORE)
|
||||
+ add_definitions(-DCRYPTOPP_DISABLE_NACL=1)
|
||||
+endif()
|
||||
+
|
||||
# Enable PIC for all target machines except 32-bit i386 due to register pressures.
|
||||
if (NOT CRYPTOPP_I386)
|
||||
SET(CMAKE_POSITION_INDEPENDENT_CODE 1)
|
||||
@@ -1022,10 +1026,10 @@ endif ()
|
||||
# add_compile_definitions added in CMake 3.12
|
||||
if (${CMAKE_VERSION} VERSION_LESS "3.12")
|
||||
# https://stackoverflow.com/q/61250087
|
||||
- add_definitions("${CMAKE_CPP_FLAGS}" "${CMAKE_CXX_FLAGS}" "${CRYPTOPP_COMPILE_DEFINITIONS}" "${CRYPTOPP_COMPILE_OPTIONS}")
|
||||
+ add_definitions(${CMAKE_CPP_FLAGS} ${CRYPTOPP_COMPILE_DEFINITIONS} ${CRYPTOPP_COMPILE_OPTIONS})
|
||||
else()
|
||||
- add_compile_definitions("${CMAKE_CPP_FLAGS}" "${CRYPTOPP_COMPILE_DEFINITIONS}")
|
||||
- add_compile_options("${CMAKE_CXX_FLAGS}" "${CRYPTOPP_COMPILE_OPTIONS}")
|
||||
+ add_compile_definitions(${CRYPTOPP_COMPILE_DEFINITIONS})
|
||||
+ add_compile_options(${CMAKE_CPP_FLAGS} ${CRYPTOPP_COMPILE_OPTIONS})
|
||||
endif()
|
||||
|
||||
#============================================================================
|
||||
12
externals/vcpkg/ports/cryptopp/patch.patch
vendored
Executable file
12
externals/vcpkg/ports/cryptopp/patch.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/config_os.h b/config_os.h
|
||||
index da27de22..9703f77d 100644
|
||||
--- a/config_os.h
|
||||
+++ b/config_os.h
|
||||
@@ -126,6 +126,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
+#include <winapifamily.h>
|
||||
# if !defined(WINAPI_FAMILY)
|
||||
# define THREAD_TIMER_AVAILABLE
|
||||
# elif defined(WINAPI_FAMILY)
|
||||
72
externals/vcpkg/ports/cryptopp/portfile.cmake
vendored
Executable file
72
externals/vcpkg/ports/cryptopp/portfile.cmake
vendored
Executable file
@@ -0,0 +1,72 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH CMAKE_SOURCE_PATH
|
||||
REPO noloader/cryptopp-cmake
|
||||
REF CRYPTOPP_8_6_0
|
||||
SHA512 655107b8a41e1e6603a6b3ed2ddc95fad22b646c071c7251c3c7e2151afe439de848679235a3790fe540263424324f06c922687719da6dfea341bc2a75337bdc
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmake.patch
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO weidai11/cryptopp
|
||||
REF CRYPTOPP_8_6_0
|
||||
SHA512 ccb4baa6674cd830cddb779216ce702b3cdba6de8a3d627c218861507c36bddd2861b0d0e8cad35001a1e9f0c3d5020404684c87dd05d85264ac166fa7f70589
|
||||
HEAD_REF master
|
||||
PATCHES patch.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
if("pem-pack" IN_LIST FEATURES)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PEM_PACK_SOURCE_PATH
|
||||
REPO noloader/cryptopp-pem
|
||||
REF 095f08ff2ef9bca7b81036a59f2395e4f08ce2e8
|
||||
SHA512 49912758a635faca1f49665ac9552b20576b46e0283aaabc19bb012bdc80586106452018e5088b9b46967717982ca6022ca968edc4cac96a7506d2b1a3e4bf13
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(GLOB PEM_PACK_FILES
|
||||
${PEM_PACK_SOURCE_PATH}/*.h
|
||||
${PEM_PACK_SOURCE_PATH}/*.cpp
|
||||
)
|
||||
file(COPY ${PEM_PACK_FILES} DESTINATION ${SOURCE_PATH})
|
||||
endif()
|
||||
|
||||
# disable assembly on ARM Windows to fix broken build
|
||||
if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "^arm")
|
||||
set(CRYPTOPP_DISABLE_ASM "ON")
|
||||
else()
|
||||
set(CRYPTOPP_DISABLE_ASM "OFF")
|
||||
endif()
|
||||
|
||||
# Dynamic linking should be avoided for Crypto++ to reduce the attack surface,
|
||||
# so generate a static lib for both dynamic and static vcpkg targets.
|
||||
# See also:
|
||||
# https://www.cryptopp.com/wiki/Visual_Studio#Dynamic_Runtime_Linking
|
||||
# https://www.cryptopp.com/wiki/Visual_Studio#The_DLL
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DBUILD_SHARED=OFF
|
||||
-DBUILD_STATIC=ON
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBUILD_DOCUMENTATION=OFF
|
||||
-DDISABLE_ASM=${CRYPTOPP_DISABLE_ASM}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install ()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cryptopp)
|
||||
|
||||
# There is no way to suppress installation of the headers and resource files in debug build.
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cryptopp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cryptopp/License.txt ${CURRENT_PACKAGES_DIR}/share/cryptopp/copyright)
|
||||
21
externals/vcpkg/ports/cryptopp/vcpkg.json
vendored
Executable file
21
externals/vcpkg/ports/cryptopp/vcpkg.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "cryptopp",
|
||||
"version": "8.6.0",
|
||||
"description": "Crypto++ is a free C++ class library of cryptographic schemes.",
|
||||
"homepage": "https://github.com/weidai11/cryptopp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"pem-pack": {
|
||||
"description": "Crypto++ with PEM pack"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user