[lzo] Fix compiler error. Add support for non-static triplets.

This commit is contained in:
Robert Schumacher 2017-01-20 14:47:06 -08:00
parent 083dfc4d9c
commit 83dcda1e11
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,17 @@
diff --git a/src/lzo_supp.h b/src/lzo_supp.h
index 87307f9..f94a6b0 100644
--- a/src/lzo_supp.h
+++ b/src/lzo_supp.h
@@ -3643,9 +3643,9 @@ LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); }
#endif
#if (LZO_OS_WIN32 || LZO_OS_WIN64)
#if (LZO_CC_INTELC || LZO_CC_MSC)
-LZO_EXTERN_C int __lzo_cdecl __setargv(void);
-LZO_EXTERN_C int __lzo_cdecl _setargv(void);
-LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); }
+// LZO_EXTERN_C int __lzo_cdecl __setargv(void);
+// LZO_EXTERN_C int __lzo_cdecl _setargv(void);
+// LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); }
#endif
#endif
#if (LZO_OS_EMX)

View File

@ -15,8 +15,24 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/do-not-declare-setargv.patch"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(ENABLE_STATIC ON)
set(ENABLE_SHARED OFF)
else()
set(ENABLE_STATIC OFF)
set(ENABLE_SHARED ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DENABLE_STATIC=${ENABLE_STATIC}
-DENABLE_SHARED=${ENABLE_SHARED}
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1