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

fix: support absolute paths for CMAKE_INSTALL_*DIR #9022

Merged

Conversation

coryan
Copy link
Contributor

@coryan coryan commented May 19, 2022

Change the config.pc.in template to use our own variables
(GOOGLE_CLOUD_CPP_PC_{LIB,INCLUDE}DIR) for the libdir= and
includedir= values. A new helper CMake macro sets these variables to
CMAKE_INSTALL_{LIB,INCLUDE}DIR when these are absolute paths,
otherwise it adds the right prefix.

I changed cmake-single-feature.sh to test for this new behavior. Maybe
abusing the build.

Fixes #8992


This change is Reviewable

Change the `config.pc.in` template to use our own variables
(`GOOGLE_CLOUD_CPP_PC_{LIB,INCLUDE}DIR`) for the `libdir=` and
`includedir=` values. A new helper CMake macro sets these variables to
`CMAKE_INSTALL_{LIB,INCLUDE}DIR` when these are absolute paths,
otherwise it adds the right prefix.

I changed `cmake-single-feature.sh` to test for this new behavior. Maybe
abusing the build.
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 8c71288a842800478d709d622ff4ab5948b48b6e

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #9022 (4d27b4d) into main (ab674fb) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #9022      +/-   ##
==========================================
- Coverage   94.47%   94.47%   -0.01%     
==========================================
  Files        1422     1422              
  Lines      125239   125239              
==========================================
- Hits       118325   118321       -4     
- Misses       6914     6918       +4     
Impacted Files Coverage Δ
...le/cloud/storage/internal/curl_download_request.cc 88.25% <0.00%> (-1.01%) ⬇️
...ud/spanner/integration_tests/client_stress_test.cc 85.52% <0.00%> (-0.66%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 97.75% <0.00%> (-0.25%) ⬇️
...e/cloud/pubsublite/internal/alarm_registry_impl.cc 100.00% <0.00%> (+2.94%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab674fb...4d27b4d. Read the comment docs.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 6b0a2dc2a52c6a0538fdd676b7735664788e230a

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 4d27b4d967cc05fa4f799fb7b4e019bb3d5f4b40

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan marked this pull request as ready for review May 19, 2022 14:11
@coryan coryan requested a review from a team as a code owner May 19, 2022 14:11
@coryan coryan merged commit 269a173 into googleapis:main May 19, 2022
@coryan coryan deleted the fix-support-absolute-cmake-install-variables branch May 19, 2022 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkg-config files are broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute
3 participants