mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 05:53:03 +08:00
parent
ce4fb05591
commit
1b3bb826e3
@ -1,77 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fb43b95..c39e470 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -281,26 +281,6 @@ function(CheckCompileOption opt var)
|
||||
endfunction(CheckCompileOption)
|
||||
|
||||
function(CheckCompileLinkOption opt var prog)
|
||||
-
|
||||
- if (MSVC)
|
||||
-
|
||||
- # TODO: improve this...
|
||||
- CHECK_CXX_COMPILER_FLAG(${opt} ${var})
|
||||
-
|
||||
- elseif (APPLE)
|
||||
-
|
||||
- message(STATUS "Performing Test ${var}")
|
||||
- try_compile(COMMAND_SUCCESS ${CMAKE_BINARY_DIR} ${prog} COMPILE_DEFINITIONS ${opt})
|
||||
- if (COMMAND_SUCCESS)
|
||||
- set(${var} 1 PARENT_SCOPE)
|
||||
- message(STATUS "Performing Test ${var} - Success")
|
||||
- else ()
|
||||
- set(${var} 0 PARENT_SCOPE)
|
||||
- message(STATUS "Performing Test ${var} - Failed")
|
||||
- endif ()
|
||||
-
|
||||
- else ()
|
||||
-
|
||||
message(STATUS "Performing Test ${var}")
|
||||
try_compile(COMMAND_SUCCESS ${CMAKE_BINARY_DIR} ${prog} COMPILE_DEFINITIONS ${opt})
|
||||
if (COMMAND_SUCCESS)
|
||||
@@ -310,9 +290,6 @@ function(CheckCompileLinkOption opt var prog)
|
||||
set(${var} 0 PARENT_SCOPE)
|
||||
message(STATUS "Performing Test ${var} - Failed")
|
||||
endif ()
|
||||
-
|
||||
- endif ()
|
||||
-
|
||||
endfunction(CheckCompileLinkOption)
|
||||
|
||||
function(AddCompileOption opt)
|
||||
@@ -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)
|
||||
@@ -605,8 +605,8 @@ endif ()
|
||||
# New as of Pull Request 461, http://github.com/weidai11/cryptopp/pull/461.
|
||||
# Must use CMAKE_CXX_COMPILER here due to XLC 13.1 and LLVM front-end.
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel" OR CMAKE_CXX_COMPILER MATCHES "xlC")
|
||||
-
|
||||
- if (CRYPTOPP_AMD64 OR CRYPTOPP_I386)
|
||||
+ # If CMAKE_CXX_COMPILER_ID is Clang and MSVC is true then we are using clang-cl
|
||||
+ if (CRYPTOPP_AMD64 OR CRYPTOPP_I386 OR MSVC)
|
||||
|
||||
# For Darwin and a GCC port compiler, we need to check for -Wa,-q first. -Wa,-q
|
||||
# is a GCC option, and it tells GCC to use the Clang Integrated Assembler. We
|
||||
@@ -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()
|
||||
|
||||
#============================================================================
|
@ -2,25 +2,26 @@ 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
|
||||
REPO abdes/cryptopp-cmake
|
||||
REF 51d00a28d761b7ae1585ee554a55fd8e6b943c9a #CRYPTOPP_8_7_0
|
||||
SHA512 cd4d6ea6b33495dd63f4204c45c6cc2a850f26d36465b7edfcca359eb7b6a3623b6116d2ab44da311cbf1dbbcb9731ab78a94fce21eb162c9773e4bf191f669a
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmake.patch
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO weidai11/cryptopp
|
||||
REF CRYPTOPP_8_6_0
|
||||
SHA512 ccb4baa6674cd830cddb779216ce702b3cdba6de8a3d627c218861507c36bddd2861b0d0e8cad35001a1e9f0c3d5020404684c87dd05d85264ac166fa7f70589
|
||||
REF 511806c0eba8ba5b5cedd4b4a814e96df92864a6 #CRYPTOPP_8_7_0
|
||||
SHA512 9d26299c6a55b32a790190c1e1dcbd9a93abc0c2a997714cb7c3a53daf9e142ba54afbd1fbaf86029dfc80d4687fd296dde589440ead07278499478d262a1483
|
||||
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})
|
||||
file(COPY "${CMAKE_SOURCE_PATH}/cryptopp" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_SOURCE_PATH}/cmake" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_SOURCE_PATH}/test" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_SOURCE_PATH}/cryptopp/cryptoppConfig.cmake" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_SOURCE_PATH}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
if("pem-pack" IN_LIST FEATURES)
|
||||
vcpkg_from_github(
|
||||
@ -35,7 +36,7 @@ if("pem-pack" IN_LIST FEATURES)
|
||||
${PEM_PACK_SOURCE_PATH}/*.h
|
||||
${PEM_PACK_SOURCE_PATH}/*.cpp
|
||||
)
|
||||
file(COPY ${PEM_PACK_FILES} DESTINATION ${SOURCE_PATH})
|
||||
file(INSTALL ${PEM_PACK_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}")
|
||||
endif()
|
||||
|
||||
# disable assembly on ARM Windows to fix broken build
|
||||
@ -52,23 +53,39 @@ endif()
|
||||
# https://www.cryptopp.com/wiki/Visual_Studio#The_DLL
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_SHARED=OFF
|
||||
-DCRYPTOPP_BUILD_SHARED=OFF
|
||||
-DBUILD_STATIC=ON
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBUILD_DOCUMENTATION=OFF
|
||||
-DCRYPTOPP_BUILD_TESTING=OFF
|
||||
-DCRYPTOPP_BUILD_DOCUMENTATION=OFF
|
||||
-DDISABLE_ASM=${CRYPTOPP_DISABLE_ASM}
|
||||
-DUSE_INTERMEDIATE_OBJECTS_TARGET=OFF # Not required when we build static only
|
||||
-DCMAKE_POLICY_DEFAULT_CMP0063=NEW # Honor "<LANG>_VISIBILITY_PRESET" properties
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
BUILD_STATIC
|
||||
USE_INTERMEDIATE_OBJECTS_TARGET
|
||||
CMAKE_POLICY_DEFAULT_CMP0063
|
||||
)
|
||||
|
||||
vcpkg_cmake_install ()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cryptopp)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/cryptopp)
|
||||
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/cryptopp.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/cryptopp.pc")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cryptopp.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/cryptopp.pc")
|
||||
vcpkg_fixup_pkgconfig()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/pkgconfig")
|
||||
|
||||
# There is no way to suppress installation of the headers and resource files in debug build.
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
# 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)
|
||||
file(COPY "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/License.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "cryptopp",
|
||||
"version": "8.6.0",
|
||||
"port-version": 2,
|
||||
"version": "8.7.0",
|
||||
"description": "Crypto++ is a free C++ class library of cryptographic schemes.",
|
||||
"homepage": "https://github.com/weidai11/cryptopp",
|
||||
"dependencies": [
|
||||
|
@ -1753,8 +1753,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"cryptopp": {
|
||||
"baseline": "8.6.0",
|
||||
"port-version": 2
|
||||
"baseline": "8.7.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"cserialport": {
|
||||
"baseline": "4.1.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "7e3fcbde366bc4af8cc2082053b671352963410d",
|
||||
"version": "8.7.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "1aecd97d5b5c29bc51bab7892b15035a8e24002d",
|
||||
"version": "8.6.0",
|
||||
|
Loading…
Reference in New Issue
Block a user