Skip to content

Supporting search paths for headers and libraries #2589

@Dariqq

Description

@Dariqq

gcc and clang honor C_INLCUDE_PATH CPLUS_INCLUDE_PATH (OBJC_INCLUDE_PATH and OBJCPLUS_INCLUDE_PATH) environment variables to search for c,cxx, (objc, objcxx) headers.

Similarly LIBRARY_PATH can be used to specify a search path for libraries.

EDIT: For msvc appearently there are INLCUDE and LIB environment variables doing the same thing.

What problem will this solve?

A header that is in C_INCLUDE_PATH or a library in LIBRARY_PATH can be found by the compiler/linker.

os.findheader and os.findlib will currently fail to find them.

What might be a solution?

Extend os.findheader and os.findlib to recognise these values.

What other alternatives have you already considered?

Rather than searching through a list of search paths manually let the compiler/linker do it with small test programs.

Anything else we should know?
Add any other context or screenshots about the feature request here.

(You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions