From 560d558e30bc9ed6187c04cf6075584328715ef3 Mon Sep 17 00:00:00 2001 From: Wouter Wijsman Date: Tue, 15 Mar 2022 16:09:04 +0100 Subject: [PATCH] Use psp-pkg-config for FindPkgConfig in CMake This make it so that when using the following code: ``` include(FindPkgConfig) pkg_search_module(SDL2 REQUIRED sdl2) ``` The variables ``${SDL2_INCLUDE_DIRS}`` and ``${SDL2_LIBRARIES}`` are set to the expected values within CMake. --- src/base/pspdev.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/pspdev.cmake b/src/base/pspdev.cmake index 9daa3c98..b4985e55 100644 --- a/src/base/pspdev.cmake +++ b/src/base/pspdev.cmake @@ -22,6 +22,8 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +SET(PKG_CONFIG_EXECUTABLE "${PSPDEV}/bin/psp-pkg-config" CACHE PATH "psp-pkg-config executable") + ## Add Default PSPSDK Libraries according to build.mak and add stdc++ for C++ builds so this doesn't need to be done manually later include_directories(${PSPDEV}/psp/include ${PSPDEV}/psp/sdk/include) link_directories( ${PSPDEV}/lib ${PSPDEV}/psp/lib ${PSPDEV}/psp/sdk/lib)