google / google/prefab

[BUG] CMake packages and imported targets naming incompatible with upstream

Open
#173 1 comment 1 reaction 0 assignees View on GitHub
bug ndkports
Dominant language
Kotlin
Stars
236
Forks
33
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Packages such as e.g. openssl and curl, when used with CMake, differ from upstream:
* FindOpenSSL module bundled with CMake means `find_package()` only works when looking for package named "OpenSSL" (NOT "openssl"); imported targets are named "OpenSSL::Crypto" and "OpenSSL::SSL" (NOT "openssl::crypto" and "openssl::ssl")
* FindCURL module bundled with CMake means `find_package()` only works when looking for package named "CURL" (NOT "curl"), CURL's own CMake project exports package named "CURL" as well; imported target in both cases is named "CURL::libcurl" (NOT "curl::curl")

These differences complicate end-user projects that want to support both Android (using NDK) and non-Android builds, because they then need to pass different names to `find_package()` and use different names of imported targets.

**To Reproduce**
Sample PR adding support for Android to a cross-platform project which has to workaround the naming issues: https://github.com/transmission/transmission/pull/6024

**Expected behavior**
Package names and imported target names should match upstream to ease consumption.

**Additional context**
Related: #98 + #105

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.