diff options
Diffstat (limited to 'Modules/CMakeFindBinUtils.cmake')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 9d76e75..dc64673 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -22,8 +22,7 @@ IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") - FIND_PROGRAM(CMAKE_LINKER NAMES link PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_LINKER NAMES link) + FIND_PROGRAM(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) MARK_AS_ADVANCED(CMAKE_LINKER) @@ -32,29 +31,18 @@ ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") - FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar) + FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) - FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib) + FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) IF(NOT CMAKE_RANLIB) SET(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib") ENDIF(NOT CMAKE_RANLIB) - FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip) - - FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld) - - FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm) - - FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump) - - FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy) + FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) MARK_AS_ADVANCED(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY) @@ -65,8 +53,7 @@ ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" # on Apple there really should be install_name_tool IF(APPLE) - FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) - FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool) + FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) IF(NOT CMAKE_INSTALL_NAME_TOOL) MESSAGE(FATAL_ERROR "Could not find install_name_tool, please check your installation.") |