build: don't use wx utils as UNIX cmds on Windows
Don't convert wx-config and wxrc into UNIX commands on a Windows host, as the paths may have spaces in them and this will break the invocation. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
53e1f44a69
commit
e5aa685f70
|
@ -223,7 +223,11 @@ else()
|
||||||
# is set
|
# is set
|
||||||
if(NOT wxWidgets_CONFIG_EXECUTABLE)
|
if(NOT wxWidgets_CONFIG_EXECUTABLE)
|
||||||
if(DEFINED ENV{WX_CONFIG})
|
if(DEFINED ENV{WX_CONFIG})
|
||||||
separate_arguments(wxWidgets_CONFIG_EXECUTABLE UNIX_COMMAND $ENV{WX_CONFIG})
|
if(NOT CMAKE_HOST_WIN32)
|
||||||
|
separate_arguments(wxWidgets_CONFIG_EXECUTABLE UNIX_COMMAND "$ENV{WX_CONFIG}")
|
||||||
|
else()
|
||||||
|
set(wxWidgets_CONFIG_EXECUTABLE "$ENV{WX_CONFIG}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
find_wx_util(wxWidgets_CONFIG_EXECUTABLE wx-config)
|
find_wx_util(wxWidgets_CONFIG_EXECUTABLE wx-config)
|
||||||
endif()
|
endif()
|
||||||
|
@ -654,10 +658,14 @@ if(CMAKE_HOST_WIN32 AND CMAKE_CROSSCOMPILING)
|
||||||
set(WXRC ${CMAKE_SOURCE_DIR}/dependencies/wxrc/wxrc.exe)
|
set(WXRC ${CMAKE_SOURCE_DIR}/dependencies/wxrc/wxrc.exe)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WXRC)
|
if(WXRC AND NOT CMAKE_HOST_WIN32)
|
||||||
separate_arguments(WXRC UNIX_COMMAND ${WXRC})
|
separate_arguments(WXRC UNIX_COMMAND ${WXRC})
|
||||||
elseif(DEFINED ENV{WXRC})
|
elseif(DEFINED ENV{WXRC})
|
||||||
separate_arguments(WXRC UNIX_COMMAND $ENV{WXRC})
|
if(NOT CMAKE_HOST_WIN32)
|
||||||
|
separate_arguments(WXRC UNIX_COMMAND "$ENV{WXRC}")
|
||||||
|
else()
|
||||||
|
set(WXRC "$ENV{WXRC}")
|
||||||
|
endif()
|
||||||
elseif(wxWidgets_CONFIG_EXECUTABLE)
|
elseif(wxWidgets_CONFIG_EXECUTABLE)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${wxWidgets_CONFIG_EXECUTABLE} --utility=wxrc
|
COMMAND ${wxWidgets_CONFIG_EXECUTABLE} --utility=wxrc
|
||||||
|
|
Loading…
Reference in New Issue