Fix detection of wxWidgets toolkit

wxWidgets_CONFIG_OPTIONS can be utilised to explicitly select GTK2 or GTK3. It
must be evaluated when querying the toolkit to avoid a mismatch between the
version actually used and the version KiCad assumes to be used.

Reapplied the original version. The previous patch has been modified
under an invalid assumption of being incompatible with msys2.
This commit is contained in:
Maciej Suminski 2018-07-27 09:02:08 +02:00
parent 0cca1c6721
commit 944d22c08a
1 changed files with 2 additions and 1 deletions

View File

@ -565,7 +565,8 @@ include( ${wxWidgets_USE_FILE} )
# Check the toolkit used to build wxWidgets
execute_process(
COMMAND sh -c "${wxWidgets_CONFIG_EXECUTABLE} ${wxWidgets_CONFIG_OPTIONS} --query-toolkit"
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --query-toolkit
RESULT_VARIABLE wxWidgets_TOOLKIT_RESULT
OUTPUT_VARIABLE wxWidgets_TOOLKIT_FOUND
OUTPUT_STRIP_TRAILING_WHITESPACE