[Openvpn-devel,v1] build: Use info fetched from version.m4

Message ID 20260414125637.42082-1-frank@lichtenheld.com
State New
Headers show
Series [Openvpn-devel,v1] build: Use info fetched from version.m4 | expand

Commit Message

Frank Lichtenheld April 14, 2026, 12:56 p.m. UTC
From: Luis Cruz <luis.cruz@nordsec.com>

Change-Id: I3157e1a228ac7058fca6a88f94076052e33d2e01
Signed-off-by: Luis Cruz <luis.cruz@nordsec.com>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1605
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1605
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <frank@lichtenheld.com>

Comments

Gert Doering April 14, 2026, 4:33 p.m. UTC | #1
I have no idea what this does, and I do not use cmake - but Frank does,
and if he says "this is good", I won't object ;-) - also, buildbot
confirms that things still work... :-)

Your patch has been applied to the master and release/2.7 branch
("long term compat").

commit fbaf4a3837cddf73694e30a5b01e012e41246b79 (master)
commit de598fc931713f07b9efb36f5041123e46b72118 (release/2.7)
Author: Luis Cruz
Date:   Tue Apr 14 14:56:37 2026 +0200

     build: Use info fetched from version.m4

     Signed-off-by: Luis Cruz <luis.cruz@nordsec.com>
     Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1605
     Message-Id: <20260414125637.42082-1-frank@lichtenheld.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36612.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 198c98f..72e349c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -141,6 +141,10 @@ 
 set(OPENVPN_VERSION_PATCH ${PRODUCT_VERSION_PATCH})
 set(OPENVPN_VERSION_RESOURCE ${PRODUCT_VERSION_RESOURCE})
 
+set(TAP_WIN_COMPONENT_ID "${PRODUCT_TAP_WIN_COMPONENT_ID}")
+set(TAP_WIN_MIN_MAJOR ${PRODUCT_TAP_WIN_MIN_MAJOR})
+set(TAP_WIN_MIN_MINOR ${PRODUCT_TAP_WIN_MIN_MINOR})
+
 set(CMAKE_C_STANDARD 11)
 
 # Set the various defines for config.h.cmake.in
diff --git a/config.h.cmake.in b/config.h.cmake.in
index a93fcd5..ae1d264 100644
--- a/config.h.cmake.in
+++ b/config.h.cmake.in
@@ -366,13 +366,13 @@ 
 #undef SYSTEMD_ASK_PASSWORD_PATH
 
 /* The tap-windows id */
-#define TAP_WIN_COMPONENT_ID "tap0901"
+#define TAP_WIN_COMPONENT_ID "@TAP_WIN_COMPONENT_ID@"
 
 /* The tap-windows version number is required for OpenVPN */
-#define TAP_WIN_MIN_MAJOR 9
+#define TAP_WIN_MIN_MAJOR @TAP_WIN_MIN_MAJOR@
 
 /* The tap-windows version number is required for OpenVPN */
-#define TAP_WIN_MIN_MINOR 9
+#define TAP_WIN_MIN_MINOR @TAP_WIN_MIN_MINOR@
 
 /* Are we running on Mac OS X? */
 #cmakedefine TARGET_DARWIN