Skip to content

CMake: cmake_pkg_config uses wrong path #431

@capitalistspz

Description

@capitalistspz

Bug Report

What's the issue you encountered?

CMake 3.31's cmake_pkg_config uses host paths instead of the devkitPro paths.

How can the issue be reproduced?

CMakeLists.txt

cmake_minimum_required(VERSION 3.31)
project(test)

cmake_pkg_config(EXTRACT freetype2 REQUIRED)
message(STATUS "${CMAKE_PKG_CONFIG_INCLUDES}")

find_package(PkgConfig REQUIRED QUIET)
pkg_search_module(freetype2 REQUIRED QUIET "freetype2")
message(STATUS "${freetype2_INCLUDEDIR}")
$ $DEVKITPRO/portlibs/wiiu/bin/powerpc-eabi-cmake .
-- -I/usr/include/freetype2
-- /opt/devkitpro/portlibs/ppc/include
-- Configuring done (0.0s)
-- Generating done (0.0s)

Environment?

EndeavourOS Linux x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions