CMake: Don't add toolkit defines to base libraries (PR #26061)

8 views
Skip to first unread message

Maarten

unread,
Dec 31, 2025, 10:33:24 AM (19 hours ago) 12/31/25
to wx-...@googlegroups.com, Subscribed

Make the libraries and library directories private.
And group all toolkit variables together.

See #26043


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26061

Commit Summary

  • 45d02e2 CMake: Don't add toolkit defines to base libraries

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26061@github.com>

VZ

unread,
Dec 31, 2025, 10:35:21 AM (19 hours ago) 12/31/25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26061)

Thanks, but I don't think (I haven't tested yet, but I just don't see how it could) this fixes the wrong wxUSE_GUI value for console apps. Can I push commits attempting to fix this here or do you plan to add more commits yourself?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26061/c3702400761@github.com>

Maarten

unread,
Dec 31, 2025, 10:38:20 AM (19 hours ago) 12/31/25
to wx-...@googlegroups.com, Subscribed
MaartenBent left a comment (wxWidgets/wxWidgets#26061)

I forgot to handle the case when the library is built with wxUSE_GUI=OFF and the base libraries should get the __WXBASE__ toolkit define.
I'll push one more commit to fix this. After that you can add commits.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26061/c3702405088@github.com>

Maarten

unread,
Dec 31, 2025, 10:45:48 AM (19 hours ago) 12/31/25
to wx-...@googlegroups.com, Push

@MaartenBent pushed 1 commit.

  • d9dbdb7 CMake: Don't add toolkit defines to base libraries


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26061/before/45d02e2de1b0da5c4a0b8b30fd980976e9e70f1a/after/d9dbdb78f648a3745b01d6e0c74b27671f49af60@github.com>

Maarten

unread,
Dec 31, 2025, 11:19:54 AM (18 hours ago) 12/31/25
to wx-...@googlegroups.com, Push

@MaartenBent pushed 1 commit.

  • af1353a CMake: Don't add toolkit defines to base libraries


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26061/before/d9dbdb78f648a3745b01d6e0c74b27671f49af60/after/af1353afda38808f792f01d7f67570936a2cc4f1@github.com>

Maarten

unread,
Dec 31, 2025, 1:16:09 PM (16 hours ago) 12/31/25
to wx-...@googlegroups.com, Subscribed

Closed #26061.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26061/issue_event/21811738008@github.com>

Maarten

unread,
Dec 31, 2025, 1:16:09 PM (16 hours ago) 12/31/25
to wx-...@googlegroups.com, Subscribed
MaartenBent left a comment (wxWidgets/wxWidgets#26061)

I don't think this is the correct approach, at least not when building the libraries. I compared against the vcxproj and configure on macOS and they both have defines for the toolkit (__WXMSW__/__WXOSX_COCOA__) when building base libraries.

It is possible to use different defines for building (target_compile_definitions(... PRIVATE ...)) and when linking with it (target_compile_definitions(... INTERFACE ...)). But wx-config --cppflags base includes the toolkit as well, so I don't think we should do something different in CMake.

wx-config --cppflags base does add the -DwxUSE_GUI=0 flag. I guess this is what you suggested initially in #26043. I'll investigate that further.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26061/c3702645143@github.com>

Reply all
Reply to author
Forward
0 new messages