mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 10:37:10 +01:00
[cryptopp] Fix UWP builds
This commit is contained in:
parent
ba7b8e6d73
commit
ca58367c9a
@ -1,3 +1,3 @@
|
||||
Source: cryptopp
|
||||
Version: 6.1.0-1
|
||||
Version: 6.1.0-2
|
||||
Description: Crypto++ is a free C++ class library of cryptographic schemes.
|
||||
|
15
ports/cryptopp/cmake.patch
Normal file
15
ports/cryptopp/cmake.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5b6e1e6..a0adcf6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -329,6 +329,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\"winapifamily.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
ports/cryptopp/patch.patch
Normal file
12
ports/cryptopp/patch.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/config.h b/config.h
|
||||
index b96b7aa..3f004ac 100644
|
||||
--- a/config.h
|
||||
+++ b/config.h
|
||||
@@ -795,6 +795,7 @@ NAMESPACE_END
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
+#include <winapifamily.h>
|
||||
# if !defined(WINAPI_FAMILY)
|
||||
# define THREAD_TIMER_AVAILABLE
|
||||
# elif defined(WINAPI_FAMILY)
|
@ -23,6 +23,13 @@ vcpkg_from_github(
|
||||
file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PATCHES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/patch.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/cmake.patch"
|
||||
)
|
||||
|
||||
# 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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user