[libevent] crt linkage fix (#8211)

* [libevent] crt linkage fix
This commit is contained in:
Nikolay Shishov 2019-09-25 20:55:43 +03:00 committed by Phil Christensen
parent 59b8e3cdb2
commit 39104b4761
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf333f3..5bc2a54 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -230,7 +230,7 @@ endif()
if (${MSVC})
set(msvc_static_runtime OFF)
- if ("${EVENT_LIBRARY_TYPE}" STREQUAL "STATIC")
+ if ("${VCPKG_CRT_LINKAGE}" STREQUAL "STATIC")
set(msvc_static_runtime ON)
endif()

View File

@ -11,6 +11,7 @@ vcpkg_from_github(
SHA512 a34ca4ad4d55a989a4f485f929d0ed2438d070d0e12a19d90c2b12783a562419c64db6a2603b093d958a75246d14ffefc8730c69c90b1b2f48339bde947f0e02
PATCHES
fix-file_path.patch
fix-crt_linkage.patch
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
@ -25,6 +26,7 @@ vcpkg_configure_cmake(
OPTIONS
-DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent
-DEVENT__LIBRARY_TYPE=${LIBEVENT_LIB_TYPE}
-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}
-DEVENT__DISABLE_BENCHMARK=ON
-DEVENT__DISABLE_TESTS=ON
-DEVENT__DISABLE_REGRESS=ON