mirror of https://github.com/microsoft/vcpkg.git
[quickfix] Remove vendored double-conversion (#52056)
Co-authored-by: Billy O'Neal <bion@microsoft.com>
This commit is contained in:
parent
15cd15b0da
commit
216bb6975d
|
|
@ -0,0 +1,79 @@
|
|||
diff --git a/src/C++/CMakeLists.txt b/src/C++/CMakeLists.txt
|
||||
index 9582c7f..38684f4 100644
|
||||
--- a/src/C++/CMakeLists.txt
|
||||
+++ b/src/C++/CMakeLists.txt
|
||||
@@ -1,4 +1,5 @@
|
||||
add_subdirectory(test)
|
||||
+find_package(double-conversion CONFIG REQUIRED)
|
||||
|
||||
set(quickfix_VERSION_MAJOR 17)
|
||||
set(quickfix_VERSION_MINOR 0)
|
||||
@@ -83,6 +84,7 @@ else()
|
||||
target_link_libraries(${PROJECT_NAME} ${OPENSSL_LIBRARIES} ${MYSQL_CLIENT_LIBS} ${PostgreSQL_LIBRARIES} ${ODBC_LIBRARIES} pthread)
|
||||
endif()
|
||||
|
||||
+target_link_libraries(${PROJECT_NAME} double-conversion::double-conversion)
|
||||
include(CheckFunctionExists)
|
||||
check_symbol_exists(ftime "sys/timeb.h" HAVE_FTIME)
|
||||
if(HAVE_FTIME)
|
||||
@@ -90,12 +92,12 @@ if(HAVE_FTIME)
|
||||
endif()
|
||||
|
||||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
|
||||
-target_include_directories(${PROJECT_NAME} INTERFACE ${PROJECT_SOURCE_DIR}/include)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/C++)
|
||||
+target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${quickfix_VERSION} SOVERSION ${quickfix_VERSION_MAJOR} )
|
||||
|
||||
-install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
||||
+install(TARGETS ${PROJECT_NAME} EXPORT quickfix-config DESTINATION lib)
|
||||
|
||||
get_target_property(debug_postfix ${PROJECT_NAME} DEBUG_POSTFIX)
|
||||
if(${debug_postfix} STREQUAL debug_postfix-NOTFOUND)
|
||||
@@ -115,3 +117,4 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/C++/ DESTINATION include/quickfix
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
PATTERN double-conversion EXCLUDE
|
||||
PATTERN test EXCLUDE)
|
||||
+install(EXPORT quickfix-config DESTINATION share/cmake/quickfix)
|
||||
diff --git a/src/C++/FieldConvertors.cpp b/src/C++/FieldConvertors.cpp
|
||||
index 3e0637a..883306f 100644
|
||||
--- a/src/C++/FieldConvertors.cpp
|
||||
+++ b/src/C++/FieldConvertors.cpp
|
||||
@@ -25,21 +25,10 @@
|
||||
|
||||
#include "FieldConvertors.h"
|
||||
#include <math.h>
|
||||
+#include <double-conversion/double-conversion.h>
|
||||
|
||||
namespace FIX {
|
||||
|
||||
-// we include "double-conversion" project in FIX namespace
|
||||
-// to avoid linking errors if quickfix is linked statically
|
||||
-// and "double-conversion" is already used by target project
|
||||
-
|
||||
-#include "double-conversion/bignum-dtoa.cc"
|
||||
-#include "double-conversion/bignum.cc"
|
||||
-#include "double-conversion/cached-powers.cc"
|
||||
-#include "double-conversion/diy-fp.cc"
|
||||
-#include "double-conversion/double-conversion.cc"
|
||||
-#include "double-conversion/fast-dtoa.cc"
|
||||
-#include "double-conversion/fixed-dtoa.cc"
|
||||
-#include "double-conversion/strtod.cc"
|
||||
|
||||
static double_conversion::DoubleToStringConverter g_dtoa_converter(
|
||||
double_conversion::DoubleToStringConverter::NO_FLAGS,
|
||||
diff --git a/src/C++/UtilitySSL.cpp b/src/C++/UtilitySSL.cpp
|
||||
index af916bc..13a48fc 100644
|
||||
--- a/src/C++/UtilitySSL.cpp
|
||||
+++ b/src/C++/UtilitySSL.cpp
|
||||
@@ -135,6 +135,9 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
+#include <winsock2.h>
|
||||
+#include <ws2tcpip.h>
|
||||
+
|
||||
#if !defined(snprintf)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
diff --git a/src/C++/CMakeLists.txt b/src/C++/CMakeLists.txt
|
||||
index 1bcc0d7c..51abba35 100644
|
||||
--- a/src/C++/CMakeLists.txt
|
||||
+++ b/src/C++/CMakeLists.txt
|
||||
@@ -84,12 +84,12 @@ else()
|
||||
endif()
|
||||
|
||||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
|
||||
-target_include_directories(${PROJECT_NAME} INTERFACE ${PROJECT_SOURCE_DIR}/include)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/C++)
|
||||
+target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${quickfix_VERSION} SOVERSION ${quickfix_VERSION_MAJOR} )
|
||||
|
||||
-install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
||||
+install(TARGETS ${PROJECT_NAME} EXPORT quickfix-config DESTINATION lib)
|
||||
|
||||
get_target_property(debug_postfix ${PROJECT_NAME} DEBUG_POSTFIX)
|
||||
if(${debug_postfix} STREQUAL debug_postfix-NOTFOUND)
|
||||
@@ -109,3 +109,4 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/C++/ DESTINATION include/quickfix
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
PATTERN double-conversion EXCLUDE
|
||||
PATTERN test EXCLUDE)
|
||||
+install(EXPORT quickfix-config DESTINATION share/cmake/quickfix)
|
||||
diff --git a/src/C++/UtilitySSL.cpp b/src/C++/UtilitySSL.cpp
|
||||
index af916bca..13a48fc6 100644
|
||||
--- a/src/C++/UtilitySSL.cpp
|
||||
+++ b/src/C++/UtilitySSL.cpp
|
||||
@@ -135,6 +135,9 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
+#include <winsock2.h>
|
||||
+#include <ws2tcpip.h>
|
||||
+
|
||||
#if !defined(snprintf)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
|
@ -5,7 +5,7 @@ vcpkg_from_github(
|
|||
SHA512 fbd45940334ea4d9f6e1f4164b0dfc0f509bd75689aa39b80ab5303b9be4f2123428e71d967f46bc5bc47ae1a521180af5ba7b619daff5f835c3dfb6dec03d50
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
00001-fix-build.patch
|
||||
00001-devendor-double-conversion.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" QUICKFIX_SHARED_LIBS)
|
||||
|
|
@ -28,6 +28,14 @@ vcpkg_cmake_install()
|
|||
vcpkg_copy_pdbs()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/quickfix)
|
||||
|
||||
set(quickfix_config "${CURRENT_PACKAGES_DIR}/share/${PORT}/quickfix-config.cmake")
|
||||
file(READ "${quickfix_config}" quickfix_config_contents)
|
||||
file(WRITE "${quickfix_config}"
|
||||
"include(CMakeFindDependencyMacro)\n"
|
||||
"find_dependency(double-conversion CONFIG)\n"
|
||||
"${quickfix_config_contents}"
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"name": "quickfix",
|
||||
"version": "1.16.0",
|
||||
"port-version": 1,
|
||||
"description": "QuickFIX is a free and open source implementation of the FIX protocol.",
|
||||
"homepage": "https://github.com/quickfix/quickfix",
|
||||
"supports": "!uwp & !(osx & arm64)",
|
||||
"dependencies": [
|
||||
"double-conversion",
|
||||
"openssl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
|
|
|||
|
|
@ -8554,7 +8554,7 @@
|
|||
},
|
||||
"quickfix": {
|
||||
"baseline": "1.16.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"quickjs-ng": {
|
||||
"baseline": "0.15.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1ba32d0e429273c51ebcd0e4185ffaeabd18701e",
|
||||
"version": "1.16.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "fa55be5f298cd85950c0ed1b05141aced69c1107",
|
||||
"version": "1.16.0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue