mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-31 05:03:22 +08:00
[gflags] Fix bug with static linking
This commit is contained in:
parent
22848e4b7e
commit
2b561712dc
13
ports/gflags/fix-static-linking.patch
Normal file
13
ports/gflags/fix-static-linking.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/gflags.h.in b/src/gflags.h.in
|
||||||
|
index 43b3f7a..82e640f 100644
|
||||||
|
--- a/src/gflags.h.in
|
||||||
|
+++ b/src/gflags.h.in
|
||||||
|
@@ -86,7 +86,7 @@
|
||||||
|
|
||||||
|
// We always want to export variables defined in user code
|
||||||
|
#ifndef GFLAGS_DLL_DEFINE_FLAG
|
||||||
|
-# ifdef _MSC_VER
|
||||||
|
+# if GFLAGS_IS_A_DLL && defined(_MSC_VER)
|
||||||
|
# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport)
|
||||||
|
# else
|
||||||
|
# define GFLAGS_DLL_DEFINE_FLAG
|
@ -1,14 +1,18 @@
|
|||||||
include(vcpkg_common_functions)
|
include(vcpkg_common_functions)
|
||||||
find_program(GIT git)
|
find_program(GIT git)
|
||||||
|
|
||||||
vcpkg_download_distfile(ARCHIVE
|
vcpkg_from_github(
|
||||||
URLS "https://github.com/gflags/gflags/archive/v2.2.0.zip"
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
FILENAME "gflags-v2.2.0.zip"
|
REPO gflags/gflags
|
||||||
SHA512 638d094cdcc759a35ebd0e57900216deec6113242d2dcc964beff7b88cf56e3dbab3dce6e10a055bfd94cb5daebb8632382219a5ef40a689e14c76b263d3eca5)
|
REF v2.2.0
|
||||||
|
SHA512 e2106ca70ff539024f888bca12487b3bf7f4f51928acf5ae3e1022f6bbd5e3b7882196ec50b609fd52f739e1f7b13eec7d4b3535d8216ec019a3577de6b4228d
|
||||||
|
HEAD_REF master
|
||||||
|
)
|
||||||
|
|
||||||
vcpkg_extract_source_archive(${ARCHIVE})
|
vcpkg_apply_patches(
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gflags-2.2.0)
|
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.patch"
|
||||||
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user