cmake: Add HINTS to toolchain file usage of find_program

Seems to help Windows CMake.
This commit is contained in:
James Benton 2019-11-20 11:29:37 +00:00
parent 9998acd4b3
commit 79698376cd

View File

@ -32,27 +32,27 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
# Find compilers # Find compilers
find_program(DEVKITPPC_GCC NAMES powerpc-eabi-gcc) find_program(DEVKITPPC_GCC NAMES powerpc-eabi-gcc HINTS "${DEVKITPPC}/bin")
if(NOT DEVKITPPC_GCC) if(NOT DEVKITPPC_GCC)
message(FATAL_ERROR "Could not find powerpc-eabi-gcc") message(FATAL_ERROR "Could not find powerpc-eabi-gcc")
endif() endif()
find_program(DEVKITPPC_GPP NAMES powerpc-eabi-g++) find_program(DEVKITPPC_GPP NAMES powerpc-eabi-g++ HINTS "${DEVKITPPC}/bin")
if(NOT DEVKITPPC_GPP) if(NOT DEVKITPPC_GPP)
message(FATAL_ERROR "Could not find powerpc-eabi-g++") message(FATAL_ERROR "Could not find powerpc-eabi-g++")
endif() endif()
find_program(DEVKITPPC_LD NAMES powerpc-eabi-ld) find_program(DEVKITPPC_LD NAMES powerpc-eabi-ld HINTS "${DEVKITPPC}/bin")
if(NOT DEVKITPPC_LD) if(NOT DEVKITPPC_LD)
message(FATAL_ERROR "Could not find powerpc-eabi-ld") message(FATAL_ERROR "Could not find powerpc-eabi-ld")
endif() endif()
find_program(DEVKITPPC_AR NAMES powerpc-eabi-ar) find_program(DEVKITPPC_AR NAMES powerpc-eabi-ar HINTS "${DEVKITPPC}/bin")
if(NOT DEVKITPPC_AR) if(NOT DEVKITPPC_AR)
message(FATAL_ERROR "Could not find powerpc-eabi-ar") message(FATAL_ERROR "Could not find powerpc-eabi-ar")
endif() endif()
find_program(DEVKITPPC_STRIP NAMES powerpc-eabi-strip) find_program(DEVKITPPC_STRIP NAMES powerpc-eabi-strip HINTS "${DEVKITPPC}/bin")
if(NOT DEVKITPPC_STRIP) if(NOT DEVKITPPC_STRIP)
message(FATAL_ERROR "Could not find powerpc-eabi-strip") message(FATAL_ERROR "Could not find powerpc-eabi-strip")
endif() endif()
@ -82,12 +82,12 @@ set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "${WUT_STANDARD_INCLUDE_DIRECTORIES}"
set(CMAKE_ASM_STANDARD_INCLUDE_DIRECTORIES "${WUT_STANDARD_INCLUDE_DIRECTORIES}" CACHE STRING "") set(CMAKE_ASM_STANDARD_INCLUDE_DIRECTORIES "${WUT_STANDARD_INCLUDE_DIRECTORIES}" CACHE STRING "")
# Find tools # Find tools
find_program(ELF2RPL_BIN NAMES elf2rpl) find_program(ELF2RPL_BIN NAMES elf2rpl HINTS "${DEVKITPRO}/tools/bin")
if(NOT ELF2RPL_BIN) if(NOT ELF2RPL_BIN)
message(FATAL_ERROR "Could not find elf2rpl") message(FATAL_ERROR "Could not find elf2rpl")
endif() endif()
find_program(RPLEXPORTGEN_BIN NAMES rplexportgen) find_program(RPLEXPORTGEN_BIN NAMES rplexportgen HINTS "${DEVKITPRO}/tools/bin")
if(NOT RPLEXPORTGEN_BIN) if(NOT RPLEXPORTGEN_BIN)
message(FATAL_ERROR "Could not find rplexportgen") message(FATAL_ERROR "Could not find rplexportgen")
endif() endif()