← Back to team overview

kicad-developers team mailing list archive

Re: Fix CMakeLists.txt

 

Hi Marcus,

Actually my memory has let my down this time. I have just checked the
patch on msys2 and it worked as expected, so I recommitted the original
version. Sorry for the noise.

Cheers,
Orson

On 07/26/2018 11:36 PM, Aimylios wrote:
> Hi Orson,
> 
> thank you for taking the time to review and merge my patches!
> 
>> Thank you for the patches, I have just merged them. I have slightly
>> modified the last patch - I realize that you used the correct convention
>> for calling execute_process(), but IIRC it did not work with msys2.
>> Therefore I simply added the suggested ${wxWidgets_CONFIG_OPTIONS} to
>> the command line and preserved "sh -c".
> 
> Unfortunately, your modified version of my third patch does not work for
> me. The reason is that wxWidgets_CONFIG_OPTIONS is of type LIST (not
> STRING).
> 
> This is the command I use to configure KiCad:
> cmake \
>     -DKICAD_SCRIPTING_WXPYTHON=OFF \
>     -DKICAD_SPICE=OFF \
>     -DCMAKE_BUILD_TYPE=Release \
>     -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config \
>     -DwxWidgets_CONFIG_OPTIONS=--toolkit=gtk2 \
>     .
> 
> With this, the expression:
> sh -c "${wxWidgets_CONFIG_EXECUTABLE} ${wxWidgets_CONFIG_OPTIONS}
> --query-toolkit"
> 
> evaluates to:
> sh -c "/usr/bin/wx-config --toolkit=gtk2;--static=no --query-toolkit"
> 
> and the semicolon (which separates the elements of the list) terminates
> the command line. Consequently, both --static=no and --query-toolkit are
> dropped. Instead, you get an error message like "sh: --static=no:
> command not found." and the build script incorrectly assumes that GTK2
> is used, even if we added --toolkit=gtk3 before.
> 
> I don't have an msys2 build environment, but maybe someone who has can
> try to check if your memory serves you right and the "correct
> convention" does not work.
> We might then have to find an alternative solution. But I am not a CMake
> guru, so any help is appreciated.
> 
> Best regards,
> Marcus


Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References