I am building wxWidgets myself on Windows using CMake and use it in my projects, which are beeing build by CMake as well, and wanted to use find_package() in Config mode instead of Module mode. I am using a monolithic build of wxWidgets and link statically. The switch from Module mode to Config mode was not that simple because both modes apparently work a bit different. I am not sure if all of these differences are by intent, so here are my observations.
find_package(wxWidgets 3.3.0 CONFIG COMPONENTS mono), while this one doesn't: find_package(wxWidgets 3.1.5 CONFIG COMPONENTS mono). Since i'm not requesting an exact match, the second call should also succeed. Or at least it should accept 3.2.0, which is the current release version.png, in Module mode i have to specify mono png but in Config mode this errors out because png cannot be found. The automatic linking seems to be the right thing to do, not sure if Module mode can be changed to do this as well.wxrc and does not populate the CMake Variable wxWidgets_wxrc_EXECUTABLE. Granted, this is not really part of the wxWidgets library and cannot really be expressed by targets, but Module Mode does populate this variable automatically.—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Config mode always requires an exact match of the library version. Currently, this is 3.3.0, so the following call works:
find_package(wxWidgets 3.3.0 CONFIG COMPONENTS mono), while this one doesn't:find_package(wxWidgets 3.1.5 CONFIG COMPONENTS mono). Since i'm not requesting an exact match, the second call should also succeed. Or at least it should accept 3.2.0, which is the current release version.
I think that the current behaviour is correct. 3.3 is not compatible with 3.2, so find_package() is refusing to use it. See also:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@sodevel,
Just an FYI
Unless you plan to work on developing CodeBlocks you don't need monolithic build.
Thank you.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
FWIW, I think (4) is a bug, but I'm not sure about the others as I never fully understood all the differences between the two modes.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
For (4), wxrc should be put in a separate EXPORT set, and the resultant export file should be included from the main wx Config cmake file. The include should be optional, so the find_package does not fail if wxrc is not available.
Ideally, each COMPONENT is put in a separate export set, or at least the ones with different, large external dependencies. E.g. one export set for the non-GUI components, one for the core GUI components, one for e.g. the Webview, etc.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()