-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2005 from meganz/release/v3.7.0a
Release/v3.7.0a
- Loading branch information
Showing
17 changed files
with
312 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
zlib | ||
cryptopp | ||
cryptopp-staticcrt | ||
libsodium | ||
sqlite3 | ||
openssl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
contrib/cmake/vcpkg_extra_ports/cryptopp-staticcrt/8.2.0/CONTROL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Source: cryptopp-staticcrt | ||
Version: 8.2.0 | ||
Homepage: https://github.com/weidai11/cryptopp | ||
Description: Crypto++ is a free C++ class library of cryptographic schemes. |
19 changes: 19 additions & 0 deletions
19
contrib/cmake/vcpkg_extra_ports/cryptopp-staticcrt/8.2.0/cmake.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 8cf9fa2..86a756b 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -336,9 +336,13 @@ if (MSVC) | ||
if (CMAKE_SYSTEM_VERSION MATCHES "10\\.0.*") | ||
list(APPEND CRYPTOPP_COMPILE_DEFINITIONS "_WIN32_WINNT=0x0A00") | ||
endif () | ||
- list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FI\"winapifamily.h\"") | ||
+ list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FIwinapifamily.h") | ||
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) |
12 changes: 12 additions & 0 deletions
12
contrib/cmake/vcpkg_extra_ports/cryptopp-staticcrt/8.2.0/patch.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/config.h b/config.h | ||
index f06992a2..be6eda31 100644 | ||
--- a/config.h | ||
+++ b/config.h | ||
@@ -814,6 +814,7 @@ NAMESPACE_END | ||
#endif | ||
|
||
#ifdef CRYPTOPP_WIN32_AVAILABLE | ||
+#include <winapifamily.h> | ||
# if !defined(WINAPI_FAMILY) | ||
# define THREAD_TIMER_AVAILABLE | ||
# elif defined(WINAPI_FAMILY) |
63 changes: 63 additions & 0 deletions
63
contrib/cmake/vcpkg_extra_ports/cryptopp-staticcrt/8.2.0/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
include(vcpkg_common_functions) | ||
|
||
# we are deliberately building a static-crt version for MEGAUpdater | ||
set(VCPKG_CRT_LINKAGE "static") | ||
vcpkg_check_linkage(ONLY_STATIC_CRT) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH CMAKE_SOURCE_PATH | ||
REPO noloader/cryptopp-cmake | ||
REF 6d0666c457fbbf6f81819fd2b80f0cb5b6646593 | ||
SHA512 0341f14ce734afaee8bcc1db1716684f241499c692a5478c83a3df3fd2e5331cd04b2f4f51d43cce231ca1d9fbe76220639573c05ef06be0cf33081a1ef7ab30 | ||
HEAD_REF master | ||
PATCHES | ||
cmake.patch | ||
staticcrt.patch | ||
) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO weidai11/cryptopp | ||
REF CRYPTOPP_8_2_0 | ||
SHA512 d2dcc107091d00800de243abdce8286ccd7fcc5707eebf88b97675456a021e62002e942b862db0465f72142951f631c0c1f0b2ba56028b96461780a17f2dfdf9 | ||
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}) | ||
|
||
# disable assembly on OSX to fix broken build | ||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
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_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
-DBUILD_SHARED=OFF | ||
-DBUILD_STATIC=ON | ||
-DBUILD_TESTING=OFF | ||
-DBUILD_DOCUMENTATION=OFF | ||
-DDISABLE_ASM=${CRYPTOPP_DISABLE_ASM} | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cryptopp-staticcrt) | ||
|
||
# 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-staticcrt) | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cryptopp-staticcrt/License.txt ${CURRENT_PACKAGES_DIR}/share/cryptopp-staticcrt/copyright) |
105 changes: 105 additions & 0 deletions
105
contrib/cmake/vcpkg_extra_ports/cryptopp-staticcrt/8.2.0/staticcrt.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 3d19bcd..6e28c24 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -1026,13 +1026,19 @@ else () | ||
endif () | ||
|
||
if (BUILD_STATIC) | ||
- add_library(cryptopp-static STATIC ${cryptopp_LIBRARY_SOURCES}) | ||
- cryptopp_target_compile_properties(cryptopp-static) | ||
+ add_library(cryptopp-staticcrt STATIC ${cryptopp_LIBRARY_SOURCES}) | ||
+ cryptopp_target_compile_properties(cryptopp-staticcrt) | ||
if (NOT ${CMAKE_VERSION} VERSION_LESS "2.8.11") | ||
- target_include_directories(cryptopp-static PUBLIC $<BUILD_INTERFACE:${SRC_DIR}> $<INSTALL_INTERFACE:include>) | ||
+ target_include_directories(cryptopp-staticcrt PUBLIC $<BUILD_INTERFACE:${SRC_DIR}> $<INSTALL_INTERFACE:include>) | ||
else () | ||
- set_target_properties(cryptopp-static PROPERTIES INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${SRC_DIR}> $<INSTALL_INTERFACE:include>") | ||
+ set_target_properties(cryptopp-staticcrt PROPERTIES INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${SRC_DIR}> $<INSTALL_INTERFACE:include>") | ||
endif () | ||
+ if (WIN32) | ||
+ set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} /MTd") | ||
+ set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} /MTd") | ||
+ set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} /MT") | ||
+ set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} /MT") | ||
+ endif() | ||
endif () | ||
|
||
if (BUILD_SHARED) | ||
@@ -1050,7 +1056,7 @@ if (NOT MSVC) | ||
set(COMPAT_VERSION ${cryptopp_VERSION_MAJOR}.${cryptopp_VERSION_MINOR}) | ||
|
||
if (BUILD_STATIC) | ||
- set_target_properties(cryptopp-static | ||
+ set_target_properties(cryptopp-staticcrt | ||
PROPERTIES | ||
OUTPUT_NAME cryptopp) | ||
endif () | ||
@@ -1066,7 +1072,7 @@ endif () | ||
# similar to how the crypto++ 'make' tool works. | ||
# see https://github.com/noloader/cryptopp-cmake/issues/32 | ||
if (BUILD_STATIC) | ||
- add_custom_target(static DEPENDS cryptopp-static) | ||
+ add_custom_target(static DEPENDS cryptopp-staticcrt) | ||
endif () | ||
if (BUILD_SHARED) | ||
add_custom_target(shared DEPENDS cryptopp-shared) | ||
@@ -1079,7 +1085,7 @@ endif () | ||
|
||
if (WIN32) | ||
if (BUILD_STATIC) | ||
- target_link_libraries(cryptopp-static ws2_32) | ||
+ target_link_libraries(cryptopp-staticcrt ws2_32) | ||
endif () | ||
if (BUILD_SHARED) | ||
target_link_libraries(cryptopp-shared ws2_32) | ||
@@ -1089,7 +1095,7 @@ endif () | ||
# This may need to be expanded to "Solaris" | ||
if (CRYPTOPP_SOLARIS) | ||
if (BUILD_STATIC) | ||
- target_link_libraries(cryptopp-static nsl socket) | ||
+ target_link_libraries(cryptopp-staticcrt nsl socket) | ||
endif () | ||
if (BUILD_SHARED) | ||
target_link_libraries(cryptopp-shared nsl socket) | ||
@@ -1098,7 +1104,7 @@ endif () | ||
|
||
find_package(Threads) | ||
if (BUILD_STATIC) | ||
- target_link_libraries(cryptopp-static ${CMAKE_THREAD_LIBS_INIT}) | ||
+ target_link_libraries(cryptopp-staticcrt ${CMAKE_THREAD_LIBS_INIT}) | ||
endif () | ||
if (BUILD_SHARED) | ||
target_link_libraries(cryptopp-shared ${CMAKE_THREAD_LIBS_INIT}) | ||
@@ -1111,7 +1117,7 @@ endif () | ||
enable_testing() | ||
if (BUILD_TESTING) | ||
add_executable(cryptest ${cryptopp_SOURCES_TEST}) | ||
- target_link_libraries(cryptest cryptopp-static) | ||
+ target_link_libraries(cryptest cryptopp-staticcrt) | ||
|
||
# Setting "cryptest" binary name to "cryptest.exe" | ||
if (NOT (WIN32 OR CYGWIN)) | ||
@@ -1176,17 +1182,17 @@ endif () | ||
|
||
# Development package | ||
if (BUILD_STATIC) | ||
- export(TARGETS cryptopp-static FILE ${export_name}.cmake ) | ||
- install(TARGETS cryptopp-static EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
+ export(TARGETS cryptopp-staticcrt FILE ${export_name}.cmake ) | ||
+ install(TARGETS cryptopp-staticcrt EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
endif () | ||
-install(FILES ${cryptopp_HEADERS} DESTINATION include/cryptopp) | ||
+install(FILES ${cryptopp_HEADERS} DESTINATION include/cryptopp-staticcrt) | ||
|
||
# CMake Package | ||
if (NOT CMAKE_VERSION VERSION_LESS 2.8.8) | ||
include(CMakePackageConfigHelpers) | ||
write_basic_package_version_file("${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake" VERSION ${cryptopp_VERSION_MAJOR}.${cryptopp_VERSION_MINOR}.${cryptopp_VERSION_PATCH} COMPATIBILITY SameMajorVersion) | ||
- install(FILES cryptopp-config.cmake ${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake DESTINATION "lib/cmake/cryptopp") | ||
- install(EXPORT ${export_name} DESTINATION "lib/cmake/cryptopp") | ||
+ install(FILES cryptopp-config.cmake ${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake DESTINATION "lib/cmake/cryptopp-staticcrt") | ||
+ install(EXPORT ${export_name} DESTINATION "lib/cmake/cryptopp-staticcrt") | ||
endif () | ||
|
||
# Tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.