Message ID | 20240116131831.31217-1-gert@greenie.muc.de |
---|---|
State | Accepted |
Headers | show |
Series | [Openvpn-devel,v4] Use mingw compile definition also to unit tests | expand |
Your patch has been applied to the master branch. (At some point we will want to collect all buildsystem-related improvements again and backport/cheery-pick to release/2.6) commit 0ce06893912830fa2044c5d6a62e6333366afd4a (master) Author: Arne Schwabe Date: Tue Jan 16 14:18:31 2024 +0100 Use mingw compile definition also to unit tests Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Frank Lichtenheld <frank@lichtenheld.com> Message-Id: <20240116131831.31217-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28019.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/CMakeLists.txt b/CMakeLists.txt index bc46c27..6f370c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,6 +290,13 @@ endif () + if (MINGW) + target_compile_definitions(${target} PRIVATE + -DWIN32_LEAN_AND_MEAN + -DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA + ) + endif() + # optional dependencies target_link_libraries(${target} PUBLIC $<TARGET_NAME_IF_EXISTS:PkgConfig::liblz4> @@ -545,11 +552,7 @@ add_library_deps(openvpn) -if (MINGW) - target_compile_options(openvpn PRIVATE - -DWIN32_LEAN_AND_MEAN - -DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA - ) +if(MINGW) target_compile_options(openvpn PRIVATE -municode -UUNICODE) target_link_options(openvpn PRIVATE -municode) endif()