Commit fa9f2f04 authored by Wayne Stambaugh's avatar Wayne Stambaugh

Fix MSYS2 build configuration issues.

parent 5c952a2a
...@@ -617,7 +617,8 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) ...@@ -617,7 +617,8 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
# Get the correct Python site package install path from the Python interpreter found by # Get the correct Python site package install path from the Python interpreter found by
# FindPythonInterp unless the user specifically defined a custom path. # FindPythonInterp unless the user specifically defined a custom path.
if( NOT PYTHON_SITE_PACKAGE_PATH ) if( NOT PYTHON_SITE_PACKAGE_PATH )
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()" execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib(plat_specific=0, standard_lib=0, prefix='')"
# execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
......
...@@ -840,6 +840,34 @@ else(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -840,6 +840,34 @@ else(wxWidgets_FIND_STYLE STREQUAL "win32")
endif(RET EQUAL 0) endif(RET EQUAL 0)
endif(wxWidgets_CONFIG_EXECUTABLE) endif(wxWidgets_CONFIG_EXECUTABLE)
# When using wx-config in MSYS, the include paths are UNIX style paths which may or may
# not work correctly depending on you MSYS/MinGW configuration. CMake expects native
# paths internally.
if(wxWidgets_FOUND AND MSYS)
find_program(_cygpath_exe cygpath ONLY_CMAKE_FIND_ROOT_PATH)
dbg_msg_v("_cygpath_exe: ${_cygpath_exe}")
if(_cygpath_exe)
set(_tmp_path "")
foreach(_path ${wxWidgets_INCLUDE_DIRS})
execute_process(
COMMAND cygpath -w ${_path}
OUTPUT_VARIABLE _native_path
RESULT_VARIABLE _retv
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
if(_retv EQUAL 0)
file(TO_CMAKE_PATH ${_native_path} _native_path)
dbg_msg_v("Path ${_path} converted to ${_native_path}")
set(_tmp_path "${_tmp_path} ${_native_path}")
endif()
endforeach()
dbg_msg("Setting wxWidgets_INCLUDE_DIRS = ${_tmp_path}")
set(wxWidgets_INCLUDE_DIRS ${_tmp_path})
separate_arguments(wxWidgets_INCLUDE_DIRS)
list(REMOVE_ITEM wxWidgets_INCLUDE_DIRS "")
endif()
endif()
#===================================================================== #=====================================================================
# Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE # Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE
#===================================================================== #=====================================================================
...@@ -900,7 +928,7 @@ include(FindPackageHandleStandardArgs) ...@@ -900,7 +928,7 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(wxWidgets find_package_handle_standard_args(wxWidgets
FOUND_VAR wxWidgets_FOUND FOUND_VAR wxWidgets_FOUND
REQUIRED_VARS wxWidgets_LIBRARIES REQUIRED_VARS wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS
VERSION_VAR wxWidgets_VERSION_STRING VERSION_VAR wxWidgets_VERSION_STRING
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment