perazz / wxMaterialDesignArtProvider

Icons Art Provider for wxWidgets with Material Design and other modern icon sets
Apache License 2.0
29 stars 1 forks source link

Question about Windows build, where is your "wx-config.exe"? #2

Closed asmwarrior closed 7 months ago

asmwarrior commented 7 months ago

Hi, I just see this:

        <Compiler>
            <Add option="-std=c++11" />
            <Add option="`wx-config --cflags`" />
        </Compiler>
        <Linker>
            <Add option="`wx-config --libs`" />
        </Linker>

Which looks like you need a "wx-config.exe" under Windows?

If that is correct, how does the "wx-config.exe" know about the wxWidgets library's location?

For me, under Windows + Code::Blocks, I use this kind of setting:

asmwarrior/cb_projects_for_wxWidgets: Code::Blocks projects for building wxWidgets sample code

With such kinds of setting, I can either build a wx project against the wx library from msys2 or my self built wx library.

perazz commented 7 months ago

Thank you for posting that @asmwarrior!

Currently, I put wx-config.exe from Codelite in %PATH%, works well also with custom-built wx installations. Apparently there is a spinoff at https://github.com/eranif/wx-config-msys2, probably it can be installed from MSYS2 directly

asmwarrior commented 7 months ago

Currently, I put wx-config.exe from Codelite in %PATH%, works well also with custom-built wx installations.

Good to hear. But I'm not sure why the above steps work. How does a wx-config.exe find a valid wx installation?

perazz commented 7 months ago

I have the default path and build set in environment variables %WXWIN% and %WXCFG%, but also the --prefix option should work

asmwarrior commented 7 months ago

OK, I just looked at the source code of wx-config.exe, it indeed try to find environment variable named WXWIN, see the source code here:

https://github.com/eranif/wx-config-msys2/blob/fe65daf2a49e2a1f218ea3106a26d5ae7c4235fb/src/utils.cpp#L85

Also, it try to find a WXCFG, see here:

https://github.com/eranif/wx-config-msys2/blob/fe65daf2a49e2a1f218ea3106a26d5ae7c4235fb/src/utils.cpp#L93

So, I think this issue can be closed.