[Openvpn-devel,master+release/2.5] vcpkg: link lzo statically
Commit Message
From: Lev Stipakov <lev@openvpn.net>
Having .dll for a single executable doesn't make
much sense. Static linking removes 117kb .dll
and grows .exe size by only 4kb.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
---
contrib/vcpkg-triplets/arm64-windows-ovpn.cmake | 3 ++-
contrib/vcpkg-triplets/x64-windows-ovpn.cmake | 3 ++-
contrib/vcpkg-triplets/x86-windows-ovpn.cmake | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
Comments
Acked-by: Gert Doering <gert@greenie.muc.de>
That came out of the "shouldn't we simplify our build scripts to make
lz4 dynamic"... turns out that dynamic libs used by a single binary only
are particulary inefficient here. Thus, going the other way :)
I have not tested this, just looked at it, and it looks reasonable
(and affects only .cmake stuff)
Your patch has been applied to the master branch.
commit cac1ebd859e9d60642d2375a2c0bdacac35ca12c (master)
commit eded6a32edcb7d4378140fcbf984fae4d8735029 (release/2.5)
Author: Lev Stipakov
Date: Wed Feb 16 15:42:27 2022 +0200
vcpkg: link lzo statically
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220216134227.147-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23807.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
@@ -2,6 +2,7 @@ set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
-if(PORT STREQUAL "lz4")
+set(STATIC_PORTS lz4 lzo)
+if(PORT IN_LIST STATIC_PORTS)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
@@ -2,6 +2,7 @@ set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
-if(PORT STREQUAL "lz4")
+set(STATIC_PORTS lz4 lzo)
+if(PORT IN_LIST STATIC_PORTS)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
@@ -2,6 +2,7 @@ set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
-if(PORT STREQUAL "lz4")
+set(STATIC_PORTS lz4 lzo)
+if(PORT IN_LIST STATIC_PORTS)
set(VCPKG_LIBRARY_LINKAGE static)
endif()