Skip to content

Commit

Permalink
Pass NO_CMAKE_FIND_ROOT_PATH when invoking FIND_FILE to find local files
Browse files Browse the repository at this point in the history
Otherwise, when cross-compiling, the prefix of the cross environment (i.e. /usr/x86_64-w64-mingw32/) is prepended to the path, leading to the files not being found
  • Loading branch information
manisandro authored and nyalldawson committed Jul 31, 2019
1 parent f051d0a commit 5c52371
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/FindPyQt5.cmake
Expand Up @@ -27,7 +27,7 @@ IF(EXISTS PYQT5_VERSION)
SET(PYQT5_FOUND TRUE)
ELSE(EXISTS PYQT5_VERSION)

FIND_FILE(_find_pyqt5_py FindPyQt5.py PATHS ${CMAKE_MODULE_PATH})
FIND_FILE(_find_pyqt5_py FindPyQt5.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)

EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt5_py} OUTPUT_VARIABLE pyqt_config)
IF(pyqt_config)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindPythonLibrary.cmake
Expand Up @@ -34,7 +34,7 @@ else(EXISTS "${PYTHON_INCLUDE_PATH}" AND EXISTS "${PYTHON_LIBRARY}" AND EXISTS "
FIND_PACKAGE(PythonInterp 3)

if(PYTHONINTERP_FOUND)
FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH})
FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)

EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_lib_python_py} OUTPUT_VARIABLE python_config)
if(python_config)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindQsci.cmake
Expand Up @@ -21,7 +21,7 @@ IF(EXISTS QSCI_MOD_VERSION_STR)
SET(QSCI_FOUND TRUE)
ELSE(EXISTS QSCI_MOD_VERSION_STR)

FIND_FILE(_find_qsci_py FindQsci.py PATHS ${CMAKE_MODULE_PATH})
FIND_FILE(_find_qsci_py FindQsci.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)

SET(QSCI_VER 5)

Expand Down
2 changes: 1 addition & 1 deletion cmake/FindSIP.cmake
Expand Up @@ -31,7 +31,7 @@ IF(SIP_VERSION)
SET(SIP_FOUND TRUE)
ELSE(SIP_VERSION)

FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH})
FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)

EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config)
IF(sip_config)
Expand Down

0 comments on commit 5c52371

Please sign in to comment.