openvpnmsica: link C runtime statically
PATCH 1/1 openvpnmsica: link C runtime statically
From: Lev Stipakov <[email protected]...>
By default CMake links C runtime dynamically,
which doesn't work on Windows 7, for example.
This is not an issue with other openvpn binaries, since we bundle C runtime, but it is not yet available during installation.
--- src/openvpnmsica/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+)
src/openvpnmsica/CMakeLists.txt +3 -0
@@ -25,7 +25,10 @@ target_compile_options(openvpnmsica PRIVATE -D_UNICODE -UNTDDI_VERSION -D_WIN32_WINNT=_WIN32_WINNT_VISTA + "$<$<CONFIG:Release>:/MT>" + "$<$<CONFIG:Debug>:/MTd>" ) + target_link_libraries(openvpnmsica advapi32.lib ole32.lib msi.lib setupapi.lib iphlpapi.lib shell32.lib shlwapi.lib version.lib newdev.lib) if (MINGW)
Signature · 1 line
2.23.0.windows.1
Quoted 8 lines · Lev Stipakov
From: Lev Stipakov <[email protected]...>
By default CMake links C runtime dynamically,
which doesn't work on Windows 7, for example.This is not an issue with other openvpn binaries, since we bundle C runtime, but it is not yet available during installation.
NAK, breaks MinGW build.
Regards,
Signature · 1 line
Frank Lichtenheld
PATCH v2 1/1 openvpnmsica: link C runtime statically
From: Lev Stipakov <[email protected]...>
By default CMake links C runtime dynamically,
which doesn't work on Windows 7, for example.
This is not an issue with other openvpn binaries, since we bundle C runtime, but it is not yet available during installation.
---
v2: fix MinGW build (apply changes to MSVC only)
src/openvpnmsica/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+)
src/openvpnmsica/CMakeLists.txt +8 -0
@@ -26,6 +26,14 @@ target_compile_options(openvpnmsica PRIVATE -UNTDDI_VERSION -D_WIN32_WINNT=_WIN32_WINNT_VISTA ) + +if (MSVC) + target_compile_options(openvpnmsica PRIVATE + "$<$<CONFIG:Release>:/MT>" + "$<$<CONFIG:Debug>:/MTd>" + ) +endif () + target_link_libraries(openvpnmsica advapi32.lib ole32.lib msi.lib setupapi.lib iphlpapi.lib shell32.lib shlwapi.lib version.lib newdev.lib) if (MINGW)
Signature · 1 line
2.38.1.windows.1
Quoted 8 lines · Lev Stipakov
From: Lev Stipakov <[email protected]...>
By default CMake links C runtime dynamically,
which doesn't work on Windows 7, for example.This is not an issue with other openvpn binaries, since we bundle C runtime, but it is not yet available during installation.
Regards,
Signature · 1 line
Frank Lichtenheld
Build tested via GHA, which does mingw and MSVC builds.
Not tested actual installers.
Your patch has been applied to the master branch.
commit 3be4986ea3d6e27acd3e3a317c15dfe07688e135 (master)
Author: Lev Stipakov Date: Wed Jul 5 15:25:28 2023 +0300
openvpnmsica: link C runtime statically
Signed-off-by: Lev Stipakov <[email protected]...>
Acked-by: Frank Lichtenheld <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg26821.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering