Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] Add CMake heuristics for header-only libraries #12386

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

ras0219
Copy link
Contributor

@ras0219 ras0219 commented Jul 12, 2020

Adds heuristics to vcpkg to detect header-only libraries and suggest CMake help of the form:

The package chaiscript:x86-windows is header only and can be used from CMake via:

    find_path(CHAISCRIPT_INCLUDE_DIRS "chaiscript/chaiscript.hpp")
    target_include_directories(main PRIVATE ${CHAISCRIPT_INCLUDE_DIRS})

The package jwt-cpp:x86-windows is header only and can be used from CMake via:

    find_path(JWT_CPP_INCLUDE_DIRS "jwt-cpp/base.h")
    target_include_directories(main PRIVATE ${JWT_CPP_INCLUDE_DIRS})

Generalizes #12365.

@LilyWangL LilyWangL self-assigned this Jul 13, 2020
@JackBoosY JackBoosY added category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed info:internal This PR or Issue was filed by the vcpkg team. labels Jul 13, 2020
@LilyWangL LilyWangL added the info:reviewed Pull Request changes follow basic guidelines label Jul 13, 2020
@strega-nil strega-nil self-requested a review July 13, 2020 18:25
Handles the case of:
```
triplet/lib/
triplet/lib/x.pc
```

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
@ras0219-msft ras0219-msft merged commit 7b3eea9 into microsoft:master Jul 13, 2020
strega-nil added a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* [vcpkg] Add CMake heuristics for header-only libraries

* [vcpkg] Update toolsrc/src/vcpkg/install.cpp

Handles the case of:
```
triplet/lib/
triplet/lib/x.pc
```

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed info:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants