Re: wxWidgets 3.2.2.1: Does configure install wxWidgetsConfig.cmake?

Maarten Bent <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
There is https://github.com/wxWidgets/wxWidgets/issues/22714 that 
addresses the issue of different files being installed.
I haven't looked into it yet.

wxWidgetsConfig.cmake is not a stand-alone file. It relies on 
wxWidgetsTargets.cmake.
These target files are generated by CMake, and contain compile 
definitions, include directories, link dependencies and library paths 
and names for each library.

You can just generate them, add them to the repo, and include them in 
the installers.
Different configure options (like shared or static) will result in 
different library names.
And link dependencies (paths/names) could be different for different 
distros.
So you'll need some script that generates the config and target file(s), 
and fills them with the stuff from configure.
Which seems not at all trivial.

To solve your initial problem.
If wxWidgets is installed with configure, you can use 
find_package(wxWidgets) 
(https://cmake.org/cmake/help/latest/module/FindwxWidgets.html) (without 
CONFIG).
This use wx-config internally. Your configure install should have 
installed this wx-config.
So I think if /path/to/somewhere/bin is in your path, it should find and 
use that wx-config, and CMake will be able to find that wxWidgets 
installation.
Setting a WX_CONFIG env. var. is also possible.

Maarten


On 2 Oct 2023 22:35, Vadim Zeitlin wrote:
> On Mon, 02 Oct 2023 22:04:46 +0200 Joost Kraaijeveld wrote:
>
> JK> Just as Ian says. E.g. Debian (my distro) uses configure to build
> JK> wxWidgets as the system installed version. Now I cannot use the Debian
> JK> installed package with cmake for some applications I maintain.
>
>   I don't know how do packagers handle this with the other libraries
> supporting both autotools and CMake (we can't be the only ones, right?).
>
> JK> But then, I don't know whether this is difficult to do this with the
> JK> current configure-based build. Is it difficult?
>
>   I don't know, sorry. I guess the simplest way would be to use CMake to
> just generate the required files and then install them?
>
> On Mon, 02 Oct 2023 22:28:26 +0200 Joost Kraaijeveld wrote:
>
> JK> BTW: comparing the installed versions of a configure-build and a cmake-
> JK> build one have a rather different set of installed files (besides
> JK> common files).
> JK>
> JK> E.g. the cmake-version has Android-headers, dfb-headers, a different
> JK> set of generic headers (a super-set of the configure-set), gtk-private
> JK> headers, motif-headers etc.
>
>   This looks like a bug in CMake install, it really shouldn't install all
> these headers, especially the private ones.
>
>   Regards,
> VZ
>

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/6b70e22c-9af3-4ab7-a4eb-7d8c60014f54%40gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.