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
|
||||
if(NOT wxWidgets_CONFIG_EXECUTABLE)
|
||||
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()
|
||||
find_wx_util(wxWidgets_CONFIG_EXECUTABLE wx-config)
|
||||
endif()
|
||||
|
@ -654,10 +658,14 @@ if(CMAKE_HOST_WIN32 AND CMAKE_CROSSCOMPILING)
|
|||
set(WXRC ${CMAKE_SOURCE_DIR}/dependencies/wxrc/wxrc.exe)
|
||||
endif()
|
||||
|
||||
if(WXRC)
|
||||
if(WXRC AND NOT CMAKE_HOST_WIN32)
|
||||
separate_arguments(WXRC UNIX_COMMAND ${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)
|
||||
execute_process(
|
||||
COMMAND ${wxWidgets_CONFIG_EXECUTABLE} --utility=wxrc
|
||||
|
|
Loading…
Reference in New Issue