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.
This commit is contained in:
Wouter Wijsman
2022-03-15 16:09:04 +01:00
committed by GitHub
parent aa211afe19
commit 560d558e30

View File

@@ -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_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE 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 ## 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) include_directories(${PSPDEV}/psp/include ${PSPDEV}/psp/sdk/include)
link_directories( ${PSPDEV}/lib ${PSPDEV}/psp/lib ${PSPDEV}/psp/sdk/lib) link_directories( ${PSPDEV}/lib ${PSPDEV}/psp/lib ${PSPDEV}/psp/sdk/lib)