From dcf341e2b6eac10701c924a69a86ad384893fa7d Mon Sep 17 00:00:00 2001 From: Ash Logan Date: Sun, 12 Apr 2020 21:04:58 +1000 Subject: [PATCH] wut.toolchain.cmake: switch pkg-config to find_program --- share/wut.toolchain.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/wut.toolchain.cmake b/share/wut.toolchain.cmake index b75c9aa..0833ac8 100644 --- a/share/wut.toolchain.cmake +++ b/share/wut.toolchain.cmake @@ -38,7 +38,10 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) # Set pkg-config for the same -set(PKG_CONFIG_EXECUTABLE "${DEVKITPRO}/portlibs/wiiu/bin/powerpc-eabi-pkg-config") +find_program(PKG_CONFIG_EXECUTABLE NAMES powerpc-eabi-pkg-config HINTS "${DEVKITPRO}/portlibs/wiiu/bin") +if (NOT PKG_CONFIG_EXECUTABLE) + message(WARNING "Could not find powerpc-eabi-pkg-config: try installing wiiu-pkg-config") +endif() # Find compilers find_program(DEVKITPPC_GCC NAMES powerpc-eabi-gcc HINTS "${DEVKITPPC}/bin")